Bug#842635: Incorrect output on i386 due to UB
solo-debianbugs at goeswhere.com
solo-debianbugs at goeswhere.com
Sun Oct 30 22:26:17 UTC 2016
Package: docbook-to-man
User: reproducible-builds at lists.alioth.debian.org
Usertags: toolchain
Version: 1:2.0.0-35
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org
On i386 (but not armhf or amd64), docbook-to-man inserts random
characters into the output.
e.g. it will sometimes generate an "I" instead of a literal tab.
I chased the bug around the code, and it looks like /usr/bin/instant has
some UB in main.c:
https://sources.debian.net/src/docbook-to-man/1:2.0.0-35/Instant/main.c/#L799
memcpy(&buf[1], &buf[2], strlen(buf)-1);
.. for bufs like " n\\011". The resulting buf contains \111, which maps
to capital I, eventually. Cool coincidence, eh.
Patch (for this case!) is simply s/memcpy/memmove/, but I doubt this is
the only case where this can happen.
More information about the Reproducible-builds
mailing list