Skip to content

Commit f677673

Browse files
author
Patrick Soquet
committed
XS: secaudit issue #15
1 parent 46e0c27 commit f677673

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

xs/sources/xsRegExp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,10 +863,10 @@ void fx_RegExp_prototype_replace(txMachine* the)
863863
item = list->next;
864864
while (item) {
865865
item->value.key.sum = mxStringLength(item->value.string);
866-
size += item->value.key.sum;
866+
size = fxAddChunkSizes(the, size, item->value.key.sum);
867867
item = item->next;
868868
}
869-
size++;
869+
size = fxAddChunkSizes(the, size, 1);
870870
mxResult->value.string = (txString)fxNewChunk(the, size);
871871
size = 0;
872872
item = list->next;

0 commit comments

Comments
 (0)