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.

Thank you!

msprintf(char **strp, const char *fmt, ...)
        va_list ap;
        va_start (ap, fmt);
        int res=vasprintf (strp, fmt, ap);
        va_end (ap);


vdr mailing list

Reply via email to