From b7e381046719cfea9414fcae6e72de95b9a3d4cc Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Wed, 23 Nov 2016 16:27:58 +0000 Subject: [PATCH] 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 --- regress/hplayback.c.m4 | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.30.2