There's no way to figure out when the labels end when the count is wrong,
so this has to be an error.
---
 src/data/sys-file-reader.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)

diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c
index f0568ee..f5b6aaf 100644
--- a/src/data/sys-file-reader.c
+++ b/src/data/sys-file-reader.c
@@ -1406,11 +1406,7 @@ read_value_labels (struct sfm_reader *r,
   label_cnt = read_int (r);
 
   if (size_overflow_p (xtimes (label_cnt, sizeof *labels)))
-    {
-      sys_warn (r, _("Invalid number of labels: %d.  Ignoring labels."),
-                label_cnt);
-      label_cnt = 0;
-    }
+    sys_error (r, _("Invalid number of labels %d."), label_cnt);
 
   /* Read each value/label tuple into labels[]. */
   labels = pool_nalloc (subpool, label_cnt, sizeof *labels);
-- 
1.7.1


_______________________________________________
pspp-dev mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/pspp-dev

Reply via email to