Skip to content

Commit dfc3c7d

Browse files
authored
Merge pull request #1683 from CEED/jrwrigh/fix_oob
fix(jit): OOB array access in CeedNormalizePath
2 parents 54f3731 + 6e25802 commit dfc3c7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/ceed-jit-tools.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ static int CeedNormalizePath(Ceed ceed, const char *source_file_path, char **nor
9797

9898
while (last_slash[0] != '/' && last_slash != *normalized_source_file_path) last_slash--;
9999
CeedCheck(last_slash != *normalized_source_file_path, ceed, CEED_ERROR_MAJOR, "Malformed source path %s", source_file_path);
100-
for (CeedInt i = 0; first_dot[i - 1]; i++) last_slash[i] = first_dot[i + 2];
100+
for (CeedInt i = 0; first_dot[i + 1]; i++) last_slash[i] = first_dot[i + 2];
101101
search_from = last_slash;
102102
}
103103
}

0 commit comments

Comments
 (0)