Skip to content

Commit

Permalink
don't overflow stack buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
phoddie authored and mhofman committed Aug 21, 2023
1 parent b2ae66a commit 0425ab8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions xsnap/sources/xsnapPlatform.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ txID fxFindModule(txMachine* the, txSlot* realm, txID moduleID, txSlot* slot)
else
slash = path;
*slash = 0;
if ((c_strlen(path) + c_strlen(name + dot)) >= sizeof(path))
mxRangeError("path too long");
c_strcat(path, name + dot);
return fxNewNameC(the, path);
}
Expand Down

0 comments on commit 0425ab8

Please sign in to comment.