Fix potential write out of bounds.

This commit is contained in:
Jordan Bancino 2023-05-26 23:47:36 +00:00
parent a7de0e4d16
commit a853c5670c
1 changed files with 1 additions and 1 deletions

View File

@ -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);