2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-15 13:02:11 +00:00

Fix use of uninitialized memory.

[SVN r18954]
This commit is contained in:
Vladimir Prus
2003-07-07 07:37:34 +00:00
parent 277126bf61
commit 06a42c2e47
2 changed files with 12 additions and 0 deletions

View File

@@ -203,6 +203,12 @@ var_string(
*out++ = *in++;
}
/* Add zero to 'out' so that 'lastword' is correctly zero-terminated. */
if (out >= oute)
return -1;
/* Don't increment, intentionally. */
*out= '\0';
/* If a variable encountered, expand it and and embed the */
/* space-separated members of the list in the output. */

View File

@@ -203,6 +203,12 @@ var_string(
*out++ = *in++;
}
/* Add zero to 'out' so that 'lastword' is correctly zero-terminated. */
if (out >= oute)
return -1;
/* Don't increment, intentionally. */
*out= '\0';
/* If a variable encountered, expand it and and embed the */
/* space-separated members of the list in the output. */