From f70bb871b56cdbc9dab3685b7a7d2090c3258b5e Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 21 Jun 2012 14:33:11 +0200 Subject: [PATCH] record_render: fix buffer overrun This appeared as charset=.. being ignored for base64 conversions, but could also be giving SEGVs. --- src/record_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- 1.7.10.4