aboutsummaryrefslogtreecommitdiff
path: root/libcrystfel/src/hdf5-file.c
diff options
context:
space:
mode:
authorValerio Mariani <valerio.mariani@desy.de>2015-07-16 18:05:00 +0200
committerThomas White <taw@physics.org>2015-07-16 18:48:49 +0200
commit93ebb7f58986e82062de8104854038b3e93673de (patch)
tree81789e3887dc9147a67f5ae2e791bc4f3864e6af /libcrystfel/src/hdf5-file.c
parente80578dd35e486666390baf7a557f1605c06f004 (diff)
Check that sep is not null before checking its length
Diffstat (limited to 'libcrystfel/src/hdf5-file.c')
-rw-r--r--libcrystfel/src/hdf5-file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcrystfel/src/hdf5-file.c b/libcrystfel/src/hdf5-file.c
index 473d7da7..24a8c282 100644
--- a/libcrystfel/src/hdf5-file.c
+++ b/libcrystfel/src/hdf5-file.c
@@ -2131,7 +2131,7 @@ int check_path_existence(hid_t fh, const char *path)
int check;
sep = strstr(start, "/");
- if ( strlen(sep) == 1 ) {
+ if ( sep != NULL && strlen(sep) == 1 ) {
ERROR("Error: Data path ends with a / symbol\n");
free(path_copy);
return 1;