From 5cedc533f80adc26848b480dec287e993489ef25 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 7 May 2011 17:17:06 +0200 Subject: [PATCH] Make xundump report invalid record IDs It failed silently before. --- src/lib/common/xundump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index 652e59c94..74a274caa 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -523,8 +523,11 @@ setnum(int fldno, double dbl) /* * If this is the record index, put it into cur_id. */ - if (fldno == 0 && ca->ca_table == cur_type) + if (fldno == 0 && ca->ca_table == cur_type) { + if (dbl < 0 || (int)dbl != dbl) + return gripe("Field %d can't hold this value", fldno + 1); cur_id = (int)dbl; + } memb_ptr = getobj(); if (!memb_ptr) -- 2.43.0