Fix potential write out of bounds.
This commit is contained in:
parent
a7de0e4d16
commit
a853c5670c
1 changed files with 1 additions and 1 deletions
|
@ -657,7 +657,7 @@ HeaderParse(Stream * stream, HeaderExpr * expr)
|
|||
/* Cope with preprocessor macro expansions at the top
|
||||
* level. */
|
||||
expr->type = HP_UNKNOWN;
|
||||
strncpy(expr->data.text, word, HEADER_EXPR_MAX);
|
||||
strncpy(expr->data.text, word, HEADER_EXPR_MAX - 1);
|
||||
}
|
||||
|
||||
Free(word);
|
||||
|
|
Loading…
Reference in a new issue