For record variables: throw NC_EVARSIZE when detecting a variable larger then X_INT64_MAX - 3 for CDF-5 files

This commit is contained in:
Wei-keng Liao 2017-09-13 11:39:38 -05:00
parent 8b3d32ca1e
commit a414fc9af8

View File

@ -747,6 +747,8 @@ NC_check_vlens(NC3_INFO *ncp)
if( IS_RECVAR(*vpp) ) {
last = 0;
if( NC_check_vlen(*vpp, vlen_max) == 0 ) {
if (fIsSet(ncp->flags,NC_64BIT_DATA)) /* too big for CDF-5 */
return NC_EVARSIZE;
large_vars_count++;
last = 1;
}