Only taint casereader if case size is unknown.
authorJohn Darrington <john@darrington.wattle.id.au>
Sat, 14 Jul 2007 06:25:23 +0000 (06:25 +0000)
committerJohn Darrington <john@darrington.wattle.id.au>
Sat, 14 Jul 2007 06:25:23 +0000 (06:25 +0000)
src/data/sys-file-reader.c

index 6d2a982db9dbe3aedc8661ed403db3fa2e9d5cb6..cecd7e3b6df37ca429b772141673379451665e1d 100644 (file)
@@ -1161,7 +1161,8 @@ sys_file_casereader_read (struct casereader *reader, void *r_,
                            sizeof (union value) * r->flt64_cnt))
         {
           case_destroy (c);
-         read_error (reader, r);
+         if ( r->case_cnt != -1 )
+           read_error (reader, r);
           return false;
         }
 
@@ -1237,7 +1238,8 @@ sys_file_casereader_read (struct casereader *reader, void *r_,
       case_destroy (c);
       if (i != 0)
         partial_record (r);
-      read_error (reader, r);
+      if ( r->case_cnt != -1 )
+       read_error (reader, r);
       return false;
     }
 }