/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2013 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
/**
xmlBufferAddHead(buf, (const xmlChar *) "<yaz_record>", -1);
xmlBufferAdd(buf, (const xmlChar *) "</yaz_record>", -1);
}
- *val = (char *) odr_malloc(o, buf->use + 1);
- memcpy(*val, buf->content, buf->use);
- (*val)[buf->use] = '\0';
-
+ *val = odr_strdupn(o, (const char *) buf->content, buf->use);
if (len)
*len = buf->use;