[PATCH 1/2] ui-ssdiff: ban strncat()

Christian Hesse list at eworm.de
Sun Feb 10 14:08:18 CET 2019

"Jason A. Donenfeld" <Jason at zx2c4.com> on Sat, 2019/02/09 12:31:
> You sure those statements are the same? Snprintf doesn't append like
> strncat. Wouldn't strlcat be the more apt replacement?

We have an unconditional

result[0] = '\0';

that mad be think it is safe. But we are inside a loop, so probably not... :-p
Let me have another look.
main(a){char*c=/*    Schoene Gruesse                         */"B?IJj;MEH"
"CX:;",b;for(a/*    Best regards             my address:    */=0;b=c[a++];)
putchar(b-1/(/*    Chris            cc -ox -xc - && ./x    */b/42*2-3)*42);}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20190210/73c9974b/attachment.asc>

More information about the CGit mailing list