From f6fc66ee4144fd536f86346f30815e39b73a0a0f Mon Sep 17 00:00:00 2001 From: Steven Mestdagh <32965539+smestdagh@users.noreply.github.com> Date: Thu, 6 Dec 2018 00:11:21 +0100 Subject: [PATCH] avoid off-by-one buffer overread similar to commit 9fcc0a72f09e6e1aa46ddcc997d3dcae87d4b416 --- miniupnpd/minissdp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpd/minissdp.c b/miniupnpd/minissdp.c index d345d64..c28ae6b 100644 --- a/miniupnpd/minissdp.c +++ b/miniupnpd/minissdp.c @@ -1043,7 +1043,7 @@ ProcessSSDPData(int s, const char *bufr, int n, { st = bufr+i+3; st_len = 0; - while((*st == ' ' || *st == '\t') && (st < bufr + n)) + while((st < bufr + n) && (*st == ' ' || *st == '\t')) st++; while((st + st_len < bufr + n) && (st[st_len]!='\r' && st[st_len]!='\n'))