Revision 1.17 seems to break a subsequent buildworld (i.e. with the new
make installed) in gnu/usr.bin/groff/src/preproc/eqn (which, being a build tool itself, is built with the original make during buildworld). The problem seems to be that in str_concat(), the string is not terminated when the length of the second string is 0. This apparently can happen during null suffix rule processing. Submitted by: tmm
This commit is contained in:
parent
80eef17ba9
commit
ade4ded301
@ -112,9 +112,12 @@ str_concat(s1, s2, flags)
|
||||
result[len1++] = '/';
|
||||
}
|
||||
|
||||
/* copy second string plus EOS into place */
|
||||
/* copy second string into place */
|
||||
if (len2)
|
||||
memcpy(result + len1, s2, len2 + 1);
|
||||
memcpy(result + len1, s2, len2);
|
||||
|
||||
/* Terminate. */
|
||||
result[len1 + len2] = '\0';
|
||||
|
||||
/* free original strings */
|
||||
if (flags & STR_DOFREE) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user