From: Bruno Haible Date: Wed, 28 Nov 2007 13:09:07 +0000 (+0000) Subject: Avoid a possible 'int' overflow. X-Git-Tag: v0.18~492 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c8a3f9d425f64cda07c0c46f9c950693c89c887;p=thirdparty%2Fgettext.git Avoid a possible 'int' overflow. --- diff --git a/gettext-runtime/intl/ChangeLog b/gettext-runtime/intl/ChangeLog index 44973c1eb..3ff46d9ab 100644 --- a/gettext-runtime/intl/ChangeLog +++ b/gettext-runtime/intl/ChangeLog @@ -1,3 +1,9 @@ +2007-11-28 Bruno Haible + + * l10nflist.c (_nl_normalize_codeset): Change type of 'len' variable + to size_t. + Patch by Wim Lewis. + 2007-11-26 Bruno Haible * vasnprintf.c (decode_long_double): Don't abort if the 'long double' diff --git a/gettext-runtime/intl/l10nflist.c b/gettext-runtime/intl/l10nflist.c index 365aeb708..7252d54e7 100644 --- a/gettext-runtime/intl/l10nflist.c +++ b/gettext-runtime/intl/l10nflist.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995-1999, 2000-2006 Free Software Foundation, Inc. +/* Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc. Contributed by Ulrich Drepper , 1995. This program is free software; you can redistribute it and/or modify it @@ -346,7 +346,7 @@ _nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list, const char * _nl_normalize_codeset (const char *codeset, size_t name_len) { - int len = 0; + size_t len = 0; int only_digit = 1; char *retval; char *wp;