Adjust buffer size of source code loading

Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
HyukWoo Park 2024-03-20 10:05:12 +09:00 committed by Patrick Kim
commit babcedce95
2 changed files with 2 additions and 2 deletions

View file

@ -252,7 +252,7 @@ static OptionalRef<StringRef> builtinHelperFileRead(OptionalRef<ExecutionStateRe
return src;
} else {
if (state) {
const size_t maxNameLength = 990;
const size_t maxNameLength = 980;
if ((strnlen(builtinName, maxNameLength) + strnlen(fileName, maxNameLength)) < maxNameLength) {
char msg[1024];
snprintf(msg, sizeof(msg), "GlobalObject.%s: cannot open file %s", builtinName, fileName);