diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2015-08-25 22:26:52 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2015-08-25 22:26:52 +0200 |
commit | 3b14c3fd6410716d407178e48972b1c1bea48c29 (patch) | |
tree | 232c9c894b45099f211728742569111738b17e16 /debian/patches/0009-Catch-malloc-error-and-exit-accordingly.patch | |
parent | edefea9d480751896e380c7bfc92517c9e39039d (diff) | |
download | libxml2-3b14c3fd6410716d407178e48972b1c1bea48c29.tar.gz |
Revert "Remove no-longer-needed upstream patches"
This reverts commit 4a5e25fad6693afda89b3826f73e83d826618863.
Diffstat (limited to 'debian/patches/0009-Catch-malloc-error-and-exit-accordingly.patch')
-rw-r--r-- | debian/patches/0009-Catch-malloc-error-and-exit-accordingly.patch | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/patches/0009-Catch-malloc-error-and-exit-accordingly.patch b/debian/patches/0009-Catch-malloc-error-and-exit-accordingly.patch new file mode 100644 index 0000000..3f93a57 --- /dev/null +++ b/debian/patches/0009-Catch-malloc-error-and-exit-accordingly.patch @@ -0,0 +1,24 @@ +From: Daniel Veillard <veillard@redhat.com> +Date: Thu, 11 Jul 2013 15:41:22 +0800 +Subject: Catch malloc error and exit accordingly + +As pointed privately by Bill Parker <wp02855@gmail.com> +--- + xmllint.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/xmllint.c b/xmllint.c +index c0196ab..4d464e4 100644 +--- a/xmllint.c ++++ b/xmllint.c +@@ -3090,6 +3090,10 @@ static void usage(const char *name) { + static void registerNode(xmlNodePtr node) + { + node->_private = malloc(sizeof(long)); ++ if (node->_private == NULL) { ++ fprintf(stderr, "Out of memory in xmllint:registerNode()\n"); ++ exit(XMLLINT_ERR_MEM); ++ } + *(long*)node->_private = (long) 0x81726354; + nbregister++; + } |