From b2a72dabdfa8bd663f0d5e61706b82953390d4fb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 16 Apr 2008 03:35:29 +0200 Subject: [PATCH] Fix bug in error handling code. --- ChangeLog | 5 +++++ lib/uniconv/u-conv-to-enc.h | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index c859ea60bb..af5da0078c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-04-15 Bruno Haible + + * lib/uniconv/u-conv-to-enc.h (FUNC): Fix return value when U_TO_U8 + fails. + 2008-04-15 Bruno Haible * lib/trim.c (trim2): Fix argument of isspace() macro. diff --git a/lib/uniconv/u-conv-to-enc.h b/lib/uniconv/u-conv-to-enc.h index fa5835dc92..b69a2b7f52 100644 --- a/lib/uniconv/u-conv-to-enc.h +++ b/lib/uniconv/u-conv-to-enc.h @@ -1,5 +1,5 @@ /* Conversion from UTF-16/UTF-32 to legacy encodings. - Copyright (C) 2002, 2006-2007 Free Software Foundation, Inc. + Copyright (C) 2002, 2006-2008 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -67,7 +67,7 @@ FUNC (const char *tocode, utf8_src = U_TO_U8 (src, srclen, tmpbuf, &tmpbufsize); if (utf8_src == NULL) - return NULL; + return -1; utf8_srclen = tmpbufsize; if (offsets != NULL) -- 2.30.2