projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fb0d76
)
Fix record_render for case where len==NULL
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 20 Jun 2012 13:19:03 +0000
(15:19 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 20 Jun 2012 13:19:03 +0000
(15:19 +0200)
In which len is unset by record_render
src/record_render.c
patch
|
blob
|
history
diff --git
a/src/record_render.c
b/src/record_render.c
index
983667a
..
69a208b
100644
(file)
--- a/
src/record_render.c
+++ b/
src/record_render.c
@@
-276,7
+276,7
@@
static const char *base64_render(NMEM nmem, WRBUF wrbuf,
const char *expr, const char *type_spec)
{
#if YAZ_HAVE_XML2
- xmlDocPtr doc = xmlParseMemory(buf, *len);
+ xmlDocPtr doc = xmlParseMemory(buf, strlen(buf));
if (doc)
{
xmlChar *buf_out;
@@
-325,7
+325,8
@@
static const char *base64_render(NMEM nmem, WRBUF wrbuf,
wrbuf_rewind(wrbuf);
wrbuf_write(wrbuf, (const char *) buf_out, len_out);
buf = wrbuf_cstr(wrbuf);
- *len = len_out;
+ if (len)
+ *len = len_out;
}
xmlFreeDoc(doc);
xmlFree(buf_out);