Skip to content

Commit a18ee64

Browse files
committed
worksheet: fix buffer overflow in table formula expansion
1 parent 69e5c5e commit a18ee64

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/worksheet.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1717,9 +1717,11 @@ _expand_table_formula(const char *formula)
17171717

17181718
ptr = formula;
17191719

1720-
while (*ptr++) {
1720+
while (*ptr) {
17211721
if (*ptr == '@')
17221722
ref_count++;
1723+
1724+
ptr++;
17231725
}
17241726

17251727
if (ref_count == 0) {

0 commit comments

Comments
 (0)