From 82e874ada98eb8677233be4b2361ae07f34eb74e Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Mon, 9 Nov 2020 20:38:45 +0100 Subject: [PATCH] remove build warning. PortMappingNumberOfEntries is supposed to be limited to 65536 should fix #501 --- miniupnpc/upnpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpc/upnpc.c b/miniupnpc/upnpc.c index 11c308d..ab24f7d 100644 --- a/miniupnpc/upnpc.c +++ b/miniupnpc/upnpc.c @@ -1,4 +1,4 @@ -/* $Id: upnpc.c,v 1.119 2018/03/13 23:34:46 nanard Exp $ */ +/* $Id: upnpc.c,v 1.126 2020/11/09 19:38:06 nanard Exp $ */ /* Project : miniupnp * Author : Thomas Bernard * Copyright (c) 2005-2020 Thomas Bernard @@ -173,7 +173,7 @@ static void ListRedirections(struct UPNPUrls * urls, printf("GetGenericPortMappingEntry() returned %d (%s)\n", r, strupnperror(r)); i++; - } while(r==0); + } while(r == 0 && i < 65536); } static void NewListRedirections(struct UPNPUrls * urls,