]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid a possible 'int' overflow.
authorBruno Haible <bruno@clisp.org>
Wed, 28 Nov 2007 13:09:07 +0000 (13:09 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:15:34 +0000 (12:15 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/l10nflist.c

index 44973c1ebe9650e4bd6516a7bcb0942b6f64d8e9..3ff46d9abf46b6b69ad03ad9cc569dcb1862a9a9 100644 (file)
@@ -1,3 +1,9 @@
+2007-11-28  Bruno Haible  <bruno@clisp.org>
+
+       * l10nflist.c (_nl_normalize_codeset): Change type of 'len' variable
+       to size_t.
+       Patch by Wim Lewis.
+
 2007-11-26  Bruno Haible  <bruno@clisp.org>
 
        * vasnprintf.c (decode_long_double): Don't abort if the 'long double'
index 365aeb708584575421404e091a10e3ac45a1caa7..7252d54e76f226724c5aeba2b600a7b419b501a0 100644 (file)
@@ -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 <drepper@gnu.ai.mit.edu>, 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;