diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2024-05-02 00:13:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 00:13:10 +0000 |
commit | 2918b2c876b74d0ba5e333676ee86228f51c24e8 (patch) | |
tree | 3aa9efd04a7b013474abd0e659f2978ef07bddfa /pkgs/applications/science/physics/crystfel/gui-path-issue.patch | |
parent | a48f3268c7b745ffe9a057b3c5e5a2b97ef68c7a (diff) | |
parent | e32981ab32c921f0506a3a560512e3a34726eafe (diff) |
Merge master into haskell-updates
Diffstat (limited to 'pkgs/applications/science/physics/crystfel/gui-path-issue.patch')
-rw-r--r-- | pkgs/applications/science/physics/crystfel/gui-path-issue.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pkgs/applications/science/physics/crystfel/gui-path-issue.patch b/pkgs/applications/science/physics/crystfel/gui-path-issue.patch new file mode 100644 index 0000000000000..28cd0280e8f67 --- /dev/null +++ b/pkgs/applications/science/physics/crystfel/gui-path-issue.patch @@ -0,0 +1,27 @@ +diff --git a/src/gui_index.c b/src/gui_index.c +index 2cc8e8db..13be77d5 100644 +--- a/src/gui_index.c ++++ b/src/gui_index.c +@@ -540,6 +540,7 @@ static void delete_gui_tempdir(char *tmpdir) + { + char *path; + int i; ++ size_t pathlen; + + /* List of files which it's safe to delete */ + char *files[] = {"gmon.out", "mosflm.lp", "SUMMARY", "XDS.INP", +@@ -552,11 +553,12 @@ static void delete_gui_tempdir(char *tmpdir) + + if ( tmpdir == NULL ) return; + +- path = calloc(strlen(tmpdir)+64, 1); ++ pathlen = strlen(tmpdir)+64; ++ path = calloc(pathlen, 1); + if ( path == NULL ) return; + + for ( i=0; i<n_files; i++ ) { +- snprintf(path, 127, "%s/%s", tmpdir, files[i]); ++ snprintf(path, pathlen, "%s/%s", tmpdir, files[i]); + unlink(path); + } + |