From: Ben Pfaff Date: Sun, 30 Jan 2011 23:41:12 +0000 (-0800) Subject: sys-file-reader: Elevate invalid number of labels from warning to error. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c091c8123879cb0cf385e167e468eb82ac69d2c;p=pspp sys-file-reader: Elevate invalid number of labels from warning to error. There's no way to figure out when the labels end when the count is wrong, so this has to be an error. --- diff --git a/src/data/sys-file-reader.c b/src/data/sys-file-reader.c index d2f48fb41d..8f39f47826 100644 --- a/src/data/sys-file-reader.c +++ b/src/data/sys-file-reader.c @@ -1408,11 +1408,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);