Skip to content

Commit

Permalink
worksheet: fix buffer overflow in table formula expansion
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcnamara committed Feb 11, 2025
1 parent 69e5c5e commit a18ee64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/worksheet.c
Original file line number Diff line number Diff line change
Expand Up @@ -1717,9 +1717,11 @@ _expand_table_formula(const char *formula)

ptr = formula;

while (*ptr++) {
while (*ptr) {
if (*ptr == '@')
ref_count++;

ptr++;
}

if (ref_count == 0) {
Expand Down

0 comments on commit a18ee64

Please sign in to comment.