Fix null ptr reference for freeReplyObject YAZ-773
[yaz-moved-to-github.git] / src / xml_match.c
index b36e2f7..0a9019a 100644 (file)
@@ -1,5 +1,5 @@
 /* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
  * See the file LICENSE for details.
  */
 /**
@@ -107,7 +107,7 @@ int yaz_match_xsd_XML_n2(xmlNodePtr ptr, const char *elem, ODR o,
         xmlBufferAddHead(buf, (const xmlChar *) "<yaz_record>", -1);
         xmlBufferAdd(buf, (const xmlChar *) "</yaz_record>", -1);
     }
-    *val = odr_strdupn(o, buf->content, buf->use);
+    *val = odr_strdupn(o, (const char *) buf->content, buf->use);
     if (len)
         *len = buf->use;