Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/usr.bin/jot



Module Name:    src
Committed By:   kamil
Date:           Sun Jun 14 01:26:46 UTC 2020

Modified Files:
        src/usr.bin/jot: jot.c

Log Message:
Generate format after setting the prec value

Otherwise we end up with setting invalid printf format: "%.-1f" (from
"if (snprintf(p, sz, "%%.%df", prec) >= (int)sz)") for prec equal to -1,
which is not canonical (rejected by gcc and clang when used explicitly).

Detected by ASan (MKSANITIZER) for "jot 8".


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/usr.bin/jot/jot.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index