From: Adam Dickmeiss Date: Thu, 21 Jun 2012 12:33:11 +0000 (+0200) Subject: record_render: fix buffer overrun X-Git-Tag: v4.2.35~4 X-Git-Url: http://jsfdemo.indexdata.com/cgi-bin?a=commitdiff_plain;h=f70bb871b56cdbc9dab3685b7a7d2090c3258b5e;p=yaz-moved-to-github.git record_render: fix buffer overrun This appeared as charset=.. being ignored for base64 conversions, but could also be giving SEGVs. --- diff --git a/src/record_render.c b/src/record_render.c index 1c8c06a..06c1184 100644 --- a/src/record_render.c +++ b/src/record_render.c @@ -465,7 +465,7 @@ const char *yaz_record_render(Z_NamePlusRecord *npr, const char *schema, if (base64_xpath) { char *type_spec = nmem_malloc(nmem, - strlen(format) + strlen(charset) + 11); + strlen(type) + strlen(charset) + 11); strcpy(type_spec, type); if (*charset) {