[PATCH] html: fix fmt() off-by-one error

Christian Hesse list at eworm.de
Tue Feb 8 12:38:28 UTC 2022

lemon <lsof at mailbox.org> on Tue, 2022/02/08 12:37:
> vsnprintf returns the byte count of the formatted output not including
> the null terminator, so in the case that len == 1024 the last character
> of the output was being truncated and not detected by the later check.
> Changing the greater than comparison to greater than or equal fixes this
> edge case.

We already have that pending...
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/20220208/cfc60078/attachment.sig>

More information about the CGit mailing list