From 5274c15d004f9c162cc32e1f12f8c2345d5a67ce Mon Sep 17 00:00:00 2001 From: Vitaly Magerya Date: Tue, 17 Mar 2026 14:48:41 +0100 Subject: [PATCH] fix: typo in GetTable The typo manifests most prominently as a double free, but it has other effects too. --- check/fixes.frm | 12 ++++++++++++ sources/store.c | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/check/fixes.frm b/check/fixes.frm index 622b1796..e3a22cd5 100644 --- a/check/fixes.frm +++ b/check/fixes.frm @@ -4581,3 +4581,15 @@ Symbol x; .end assert succeeded? *--#] PullReq691 : +*--#[ Issue808 : +#do i=0,9 +Global E`i' = `i'; +#enddo +.store +#do i=1,80 +Global F1 = E{`i' % 10}*E2*E3*E4; +#enddo +.sort +.end +assert succeeded? +*--#] Issue808 : diff --git a/sources/store.c b/sources/store.c index 0a7ecd3a..22205611 100644 --- a/sources/store.c +++ b/sources/store.c @@ -3207,7 +3207,7 @@ RENUMBER GetTable(WORD expr, POSITION *position, WORD mode) WCOPY(buffer, AS.Olduflags, AS.NumOldNumFactors); M_free(AS.Olduflags, "uflags pointers"); } - AS.Oldvflags = buffer; + AS.Olduflags = buffer; AS.NumOldNumFactors = capacity; }