mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-11-05 12:10:38 +03:00
Avoid an error in namespace generation
* libxslt/namespaces.c: fix xsltGetSpecialNamespace fallback with uninitialized prefix string
This commit is contained in:
@@ -584,6 +584,10 @@ declare_new_prefix:
|
|||||||
xmlChar pref[30];
|
xmlChar pref[30];
|
||||||
int counter = 1;
|
int counter = 1;
|
||||||
|
|
||||||
|
if (nsPrefix == NULL) {
|
||||||
|
nsPrefix = "ns";
|
||||||
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
snprintf((char *) pref, 30, "%s_%d", nsPrefix, counter++);
|
snprintf((char *) pref, 30, "%s_%d", nsPrefix, counter++);
|
||||||
ns = xmlSearchNs(target->doc, target, BAD_CAST pref);
|
ns = xmlSearchNs(target->doc, target, BAD_CAST pref);
|
||||||
|
|||||||
Reference in New Issue
Block a user