Skip to content

Commit 1929250

Browse files
authored
Fix bad allocation size. (#519)
1 parent 44af5f5 commit 1929250

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gmt_gdalread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ int gmt_gdalread (struct GMT_CTRL *GMT, char *gdal_filename, struct GMT_GDALREAD
738738
for (n = 0; prhs->B.bands[n]; n++)
739739
if (prhs->B.bands[n] == '-') n_dash = (int)n;
740740
if ((n_commas + n_dash) == 0)
741-
nn = atoi(prhs->B.bands);
741+
nn = 1;
742742
else {
743743
/* This part of the algorithm only works well for three bands. When more, it's very wrong MUST FIX */
744744
nn = MAX(n_commas+1, n_dash);

0 commit comments

Comments
 (0)