diff options
author | Tobias Markmann <tm@ayena.de> | 2017-05-16 14:59:08 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2017-05-17 06:36:48 (GMT) |
commit | edf519a67a28f9acb61af6d442d94f1aa43df688 (patch) | |
tree | 802269050d3db7c13c763550269f663172938b96 /3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c | |
parent | 6644c207c879f33dac40c02ab6787a0c4184728d (diff) | |
download | swift-edf519a67a28f9acb61af6d442d94f1aa43df688.zip swift-edf519a67a28f9acb61af6d442d94f1aa43df688.tar.bz2 |
Update 3rdParty/LibMiniUPnPc to miniupnpc-2.0.20170509
Test-Information:
Builds on macOS 10.12.5 with Qt 5.4.2 and all unit and
integration tests pass.
Change-Id: I491c0f78bf8773056feb3825d21989d6c7a2aeab
Diffstat (limited to '3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c')
-rw-r--r-- | 3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c b/3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c index eb4d7d9..3e201ec 100644 --- a/3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c +++ b/3rdParty/LibMiniUPnPc/src/miniupnpc/minixml.c @@ -1,10 +1,10 @@ -/* $Id: minixml.c,v 1.10 2012/03/05 19:42:47 nanard Exp $ */ +/* $Id: minixml.c,v 1.11 2014/02/03 15:54:12 nanard Exp $ */ /* minixml.c : the minimum size a xml parser can be ! */ /* Project : miniupnp * webpage: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * Author : Thomas Bernard -Copyright (c) 2005-2011, Thomas BERNARD +Copyright (c) 2005-2014, Thomas BERNARD All rights reserved. Redistribution and use in source and binary forms, with or without @@ -113,7 +113,20 @@ static void parseelt(struct xmlparser * p) const char * elementname; while(p->xml < (p->xmlend - 1)) { - if((p->xml)[0]=='<' && (p->xml)[1]!='?') + if((p->xml + 4) <= p->xmlend && (0 == memcmp(p->xml, "<!--", 4))) + { + p->xml += 3; + /* ignore comments */ + do + { + p->xml++; + if ((p->xml + 3) >= p->xmlend) + return; + } + while(memcmp(p->xml, "-->", 3) != 0); + p->xml += 3; + } + else if((p->xml)[0]=='<' && (p->xml)[1]!='?') { i = 0; elementname = ++p->xml; while( !IS_WHITE_SPACE(*p->xml) |