Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

1.3 KB
Raw Blame
diff --git a/thirdparty/miniupnpc/src/minixml.c b/thirdparty/miniupnpc/src/minixml.c
index 935ec443e7..b102f83538 100644
--- a/thirdparty/miniupnpc/src/minixml.c
+++ b/thirdparty/miniupnpc/src/minixml.c
@@ -2,10 +2,10 @@
 /* vim: tabstop=4 shiftwidth=4 noexpandtab
  * minixml.c : the minimum size a xml parser can be ! */
 /* Project : miniupnp
- * webpage: http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
+ * webpage: http://miniupnp.free.fr/ or https://miniupnp.tuxfamily.org/
  * Author : Thomas Bernard
 
-Copyright (c) 2005-2017, Thomas BERNARD
+Copyright (c) 2005-2026, Thomas BERNARD
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
 #include <string.h>
 #include "minixml.h"
 
-/* parseatt : used to parse the argument list
+/* parseatt : used to parse the attribute list
  * return 0 (false) in case of success and -1 (true) if the end
  * of the xmlbuffer is reached. */
 static int parseatt(struct xmlparser * p)
@@ -63,6 +63,9 @@ static int parseatt(struct xmlparser * p)
 				if(p->xml >= p->xmlend)
 					return -1;
 			}
+			/* p->xml points now to the character right after the '=' */
+			if(p->xml >= p->xmlend)
+				return -1;
 			while(IS_WHITE_SPACE(*p->xml))
 			{
 				p->xml++;