]> pd.if.org Git - pdclib/blobdiff - functions/_PDCLIB/scan.c
_PDCLIB_scan: Had incorrect upper bound on field width causing integer overflow
[pdclib] / functions / _PDCLIB / scan.c
index 57f9831e457cd3dc918e4341befb2add07ced794..7e6c42c4c53c12e2d1e22e1a98b38b73508e05c1 100644 (file)
@@ -162,7 +162,7 @@ const char * _PDCLIB_scan( const char * spec, struct _PDCLIB_status_t * status )
     status->width = (int)strtol( spec, (char**)&spec, 10 );
     if ( spec == prev_spec )
     {
-        status->width = SIZE_MAX;
+        status->width = INT_MAX;
     }
 
     /* Optional length modifier