Merge pull request #12305 from SuperSamus/expr-buffer-size

expr: increase size of `varname`
This commit is contained in:
Admiral H. Curtiss 2023-11-22 23:05:55 +01:00 committed by GitHub
commit ab76b15e05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -783,7 +783,7 @@ static struct expr *expr_create(const char *s, size_t len,
struct expr *p = &root;
/* Assign macro parameters */
for (int j = 0; j < vec_len(&arg.args); j++) {
char varname[12];
char varname[13];
snprintf(varname, sizeof(varname), "$%d", (j + 1));
struct expr_var *v = expr_get_var(vars, varname, strlen(varname));
struct expr ev = expr_varref(v);