diff options
author | Martin <gzlist@googlemail.com> | 2009-09-17 11:09:22 +0200 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2009-09-17 11:09:22 +0200 |
commit | b1ca88f45976962504865a9c977dd625c381b237 (patch) | |
tree | 358afed6268928380d95b3ef3ae80fc4f32846d7 | |
parent | 4fedd0dc16bfa394e7dd0b2a44e21256ce3b4021 (diff) | |
download | libxslt-b1ca88f45976962504865a9c977dd625c381b237.tar.gz |
Avoid an error in namespace generation
* libxslt/namespaces.c: fix xsltGetSpecialNamespace fallback with
uninitialized prefix string
-rw-r--r-- | libxslt/namespaces.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libxslt/namespaces.c b/libxslt/namespaces.c index b147df8f..3e3891fb 100644 --- a/libxslt/namespaces.c +++ b/libxslt/namespaces.c @@ -584,6 +584,10 @@ declare_new_prefix: xmlChar pref[30]; int counter = 1; + if (nsPrefix == NULL) { + nsPrefix = "ns"; + } + do { snprintf((char *) pref, 30, "%s_%d", nsPrefix, counter++); ns = xmlSearchNs(target->doc, target, BAD_CAST pref); |