We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5eddb9e commit 356b31dCopy full SHA for 356b31d
libsrc/var.c
@@ -533,6 +533,8 @@ NC_check_vlen(NC_var *varp, long long vlen_max) {
533
for(ii = IS_RECVAR(varp) ? 1 : 0; ii < varp->ndims; ii++) {
534
if(!varp->shape)
535
return 0; /* Shape is undefined/NULL. */
536
+ if(prod <= 0)
537
+ return 0; /* Multiplication operations may result in overflow */
538
if ((long long)varp->shape[ii] > vlen_max / prod) {
539
return 0; /* size in bytes won't fit in a 32-bit int */
540
}
0 commit comments