From 0a1043fe4b7f9e22e7481dc9d81a0a8ca2092292 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 9 Jun 2008 17:07:14 +0200 Subject: [PATCH] Allow NULL inp(ut) for utf8 decoder --- src/utf8.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utf8.c b/src/utf8.c index bf92cd3..8c28d3a 100644 --- a/src/utf8.c +++ b/src/utf8.c @@ -22,7 +22,7 @@ static size_t init_utf8(yaz_iconv_t cd, yaz_iconv_decoder_t d, unsigned char *inp, size_t inbytesleft, size_t *no_read) { - if (inp[0] != 0xef) + if (!inp || inp[0] != 0xef) { *no_read = 0; return 0; -- 1.7.10.4