[vdr] trouble with asprintf
wolfgang at rohdewald.de
Sun Feb 10 17:45:30 CET 2008
On Sonntag, 10. Februar 2008, Klaus Schmidinger wrote:
> You could use VDR's cString::sprintf() instead.
> This is probably also what I am going to do in the VDR core code,
> to avoid asprintf() altogether. The single leftover vasprintf()
> call in cString::sprintf() can then be made safe.
vasprintf was a good hint - I only had to change asprintf to vasprintf,
same arguments. now it works as expected.
I will use my msprintf until you have made cString::sprintf() safe.
msprintf(char **strp, const char *fmt, ...)
va_start (ap, fmt);
int res=vasprintf (strp, fmt, ap);
More information about the vdr