From 93ebb7f58986e82062de8104854038b3e93673de Mon Sep 17 00:00:00 2001 From: Valerio Mariani Date: Thu, 16 Jul 2015 18:05:00 +0200 Subject: Check that sep is not null before checking its length --- libcrystfel/src/hdf5-file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libcrystfel') 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; -- cgit v1.2.3