CRASH: reading very large GRIB1 message. Grow buffer if needed
@@ -268,6 +268,7 @@ static int read_GRIB(reader* r)
i++;
}
/* Read section 2 */
+ GROW_BUF_IF_REQUIRED(i+sec2len);
if((r->read(r->read_data,tmp+i,sec2len-3,&err) != sec2len-3) || err)
return err;
i += sec2len-3;
