[strongSwan] Accounting Tickets
Thomas Jarosch
thomas.jarosch at intra2net.com
Fri Feb 24 14:25:42 CET 2012
Hi Martin,
On Friday, 24. February 2012 10:58:54 Martin Willi wrote:
> Hm, might make sense in some setups, try the attached patch.
While looking at the patch out of curiosity, I noticed two things
regarding the snprintf() usage:
- If the source string is larger than the destination buffer,
zero termination of the destination buffer is implementation defined.
C99 states it will always be zero terminated IIRC.
So this is not a real issue.
- Return value of snprintf() is the number of bytes that would
have been written -if- the destination buffer is not big enough.
See also: http://lwn.net/Articles/69419/
A quick grep showed that
libstrongswan/plugins/pem/pem_encoder.c
seems to be affected. What do you think?
Best regards,
Thomas
More information about the Users
mailing list