From: Adam Dickmeiss Date: Mon, 15 Oct 2007 12:00:31 +0000 (+0000) Subject: Increase intermediate buffers for wrbuf+iconv. X-Git-Tag: YAZ.3.0.16~58 X-Git-Url: http://git.indexdata.com/?p=yaz-moved-to-github.git;a=commitdiff_plain;h=0efc47dc6d0080180038945a5f914749c3585799 Increase intermediate buffers for wrbuf+iconv. The intermediate buffer for wrbuf+iconv is increased from 12 to 16 bytes. There may be MARC-8 sequence overflows overwise - with at least reset (flush). --- diff --git a/src/wrbuf.c b/src/wrbuf.c index d8a709e..09acce7 100644 --- a/src/wrbuf.c +++ b/src/wrbuf.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2007, Index Data ApS * See the file LICENSE for details. * - * $Id: wrbuf.c,v 1.20 2007-09-17 19:14:26 adam Exp $ + * $Id: wrbuf.c,v 1.21 2007-10-15 12:00:31 adam Exp $ */ /** @@ -160,7 +160,7 @@ static int wrbuf_iconv_write_x(WRBUF b, yaz_iconv_t cd, const char *buf, { if (cd) { - char outbuf[12]; + char outbuf[16]; size_t inbytesleft = size; const char *inp = buf; while (inbytesleft) @@ -217,7 +217,7 @@ void wrbuf_iconv_reset(WRBUF b, yaz_iconv_t cd) { if (cd) { - char outbuf[12]; + char outbuf[16]; size_t outbytesleft = sizeof(outbuf); char *outp = outbuf; size_t r = yaz_iconv(cd, 0, 0, &outp, &outbytesleft);