aboutsummaryrefslogtreecommitdiff
path: root/external/miniupnpc/minixmlvalid.c
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-12-30 12:28:03 +0200
committerRiccardo Spagni <ric@spagni.net>2015-12-30 12:28:03 +0200
commit7223eebbe71833e895fca95267cb243834dedf83 (patch)
treea5d48783316ff837e353c51a29b54f5324dd0bb1 /external/miniupnpc/minixmlvalid.c
parentMerge pull request #575 (diff)
parentno longer need to pass the size to rapidjson (diff)
downloadmonero-7223eebbe71833e895fca95267cb243834dedf83.tar.xz
Merge pull request #577
32a2633 no longer need to pass the size to rapidjson (Riccardo Spagni) bd8e0fd add missing miniupnpc files, modify cmake to not build miniupnpc tests and to fix an issue with finding miniupnpcstrings (Riccardo Spagni) 7da9905 updated miniupnpc (Riccardo Spagni)
Diffstat (limited to 'external/miniupnpc/minixmlvalid.c')
-rw-r--r--external/miniupnpc/minixmlvalid.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/external/miniupnpc/minixmlvalid.c b/external/miniupnpc/minixmlvalid.c
index 0a112bf89..dad148812 100644
--- a/external/miniupnpc/minixmlvalid.c
+++ b/external/miniupnpc/minixmlvalid.c
@@ -1,4 +1,4 @@
-/* $Id: minixmlvalid.c,v 1.6 2012/05/01 16:24:07 nanard Exp $ */
+/* $Id: minixmlvalid.c,v 1.7 2015/07/15 12:41:15 nanard Exp $ */
/* MiniUPnP Project
* http://miniupnp.tuxfamily.org/ or http://miniupnp.free.fr/
* minixmlvalid.c :
@@ -128,6 +128,11 @@ int testxmlparser(const char * xml, int size)
struct xmlparser parser;
evtlist.n = 0;
evtlist.events = malloc(sizeof(struct event)*100);
+ if(evtlist.events == NULL)
+ {
+ fprintf(stderr, "Memory allocation error.\n");
+ return -1;
+ }
memset(&parser, 0, sizeof(parser));
parser.xmlstart = xml;
parser.xmlsize = size;