Skip to content

Commit

Permalink
Merge pull request #1683 from CEED/jrwrigh/fix_oob
Browse files Browse the repository at this point in the history
fix(jit): OOB array access in CeedNormalizePath
  • Loading branch information
jrwrigh authored Oct 8, 2024
2 parents 54f3731 + 6e25802 commit dfc3c7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion interface/ceed-jit-tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ static int CeedNormalizePath(Ceed ceed, const char *source_file_path, char **nor

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

0 comments on commit dfc3c7d

Please sign in to comment.