Patch has been forwarded to upstream and merged:
https://github.com/BIC-MNI/libminc/pull/19
Please find attached a new version of the patch containing the
"Forwarded" tag with the above URL.
Cheers,
Martin
Description: Fix crash when input file cannot be expanded
This patch fixes a segmentation fault that occurs when an input
file indicates compression (e.g. by having an extension ".bz2",
".gz", etc.), but doesn't really contain data in the corresponding
compression format. In this case, exit with an error message instead
of just crashing.
Author: Martin Steghöfer <mar...@steghoefer.eu>
Bug-Debian: http://bugs.debian.org/716511
Forwarded: https://github.com/BIC-MNI/libminc/pull/19
--- minc-2.2.00.orig/libsrc/voxel_loop.c
+++ minc-2.2.00/libsrc/voxel_loop.c
@@ -2354,6 +2354,10 @@ PRIVATE int get_input_mincid(Loopfile_In
filename = miexpand_file(loopfile_info->input_files[file_num], NULL,
loopfile_info->headers_only,
&created_tempfile);
+ if (!filename) {
+ fprintf(stderr, "Could not expand file \"%s\"!\n", loopfile_info->input_files[file_num]);
+ exit(EXIT_FAILURE);
+ }
loopfile_info->input_mincid[index] = miopen(filename, NC_NOWRITE);
if (created_tempfile) {
(void) remove(filename);