From a1adc770bc8b74097e1d4388d16b1246063da7e7 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Tue, 23 May 2006 13:17:30 +0000 Subject: [PATCH] Fixed bug #593: Buffers too small for MARC string buffers. --- src/marcdisp.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/marcdisp.c b/src/marcdisp.c index da04f45..e7df01e 100644 --- a/src/marcdisp.c +++ b/src/marcdisp.c @@ -2,7 +2,7 @@ * Copyright (C) 1995-2006, Index Data ApS * See the file LICENSE for details. * - * $Id: marcdisp.c,v 1.29 2006-05-02 20:47:45 adam Exp $ + * $Id: marcdisp.c,v 1.30 2006-05-23 13:17:30 adam Exp $ */ /** @@ -548,7 +548,9 @@ static int yaz_marc_write_marcxml_ns(yaz_marc_t mt, WRBUF wr, wrbuf_printf(wr, "\n"); break; case YAZ_MARC_COMMENT: - wrbuf_printf(wr, "\n", n->u.comment); + wrbuf_printf(wr, "\n"); break; case YAZ_MARC_LEADER: wrbuf_printf(wr, " "); @@ -670,11 +672,15 @@ int yaz_marc_write_iso2709(yaz_marc_t mt, WRBUF wr) wrbuf_printf(wr, "%.*s", indicator_length, n->u.datafield.indicator); for (s = n->u.datafield.subfields; s; s = s->next) - wrbuf_printf(wr, "%c%s", ISO2709_IDFS, s->code_data); + { + wrbuf_printf(wr, "%c", ISO2709_IDFS); + wrbuf_puts(wr, s->code_data); + } wrbuf_printf(wr, "%c", ISO2709_FS); break; case YAZ_MARC_CONTROLFIELD: - wrbuf_printf(wr, "%s%c", n->u.controlfield.data, ISO2709_FS); + wrbuf_puts(wr, n->u.controlfield.data); + wrbuf_printf(wr, "%c", ISO2709_FS); break; case YAZ_MARC_COMMENT: break; -- 1.7.10.4