diff options
author | Andy Wingo <wingo@pobox.com> | 2017-02-15 21:41:24 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2017-02-15 21:41:24 +0100 |
commit | 7e641595cd9b45ce7339e21c20a8ab81af9278f6 (patch) | |
tree | 8d224f14ad2cb5dc18a8375197c651e4563ec0cd /lib/localcharset.c | |
parent | 69ca2bb2217303b2556b131f3995ca4f6af81234 (diff) | |
download | guile-7e641595cd9b45ce7339e21c20a8ab81af9278f6.tar.gz |
Update Gnulib to v0.1-1157-gb03f418.
Diffstat (limited to 'lib/localcharset.c')
-rw-r--r-- | lib/localcharset.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/localcharset.c b/lib/localcharset.c index 7ce17e69e..4be72d616 100644 --- a/lib/localcharset.c +++ b/lib/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2016 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2017 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 by @@ -507,7 +507,7 @@ locale_charset (void) current_locale = setlocale (LC_CTYPE, NULL); pdot = strrchr (current_locale, '.'); - if (pdot) + if (pdot && 2 + strlen (pdot + 1) + 1 <= sizeof (buf)) sprintf (buf, "CP%s", pdot + 1); else { |