diff options
-rw-r--r-- | tools/raw2tiff.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/raw2tiff.c b/tools/raw2tiff.c index 2ec3cd45..0c6001f7 100644 --- a/tools/raw2tiff.c +++ b/tools/raw2tiff.c @@ -209,6 +209,11 @@ main(int argc, char* argv[]) return (EXIT_FAILURE); } + if (nbands == 0) { + fprintf(stderr, "The number of bands is illegal.\n"); + return (-1); + } + if (guessSize(fd, dtype, hdr_size, nbands, swab, &width, &length) < 0) return EXIT_FAILURE; |