From: Ian Jackson Date: Wed, 23 Nov 2016 16:27:58 +0000 (+0000) Subject: regress: playback: Do not accept numeric errno values except 1..255 X-Git-Tag: adns-1.6.0~85 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=b7e381046719cfea9414fcae6e72de95b9a3d4cc;p=adns.git regress: playback: Do not accept numeric errno values except 1..255 In particular do not accept zero, which the operating system won't produce. Signed-off-by: Ian Jackson --- diff --git a/regress/hplayback.c.m4 b/regress/hplayback.c.m4 index fb4295c..312a04a 100644 --- a/regress/hplayback.c.m4 +++ b/regress/hplayback.c.m4 @@ -124,6 +124,7 @@ static int Perrno(const char *stuff) { if (te->n) return te->v; r= strtoul(stuff+2,&ep,10); if (*ep) Psyntax("errno value not recognised, not numeric"); + if (r==0 || r>255) Psyntax("numeric errno out of range 1..255"); return r; }