aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2016-10-23 16:45:21 +0200
committerCorinna Vinschen <corinna@vinschen.de>2016-10-23 16:45:21 +0200
commitcf01b8f0290eacb35d2c5206b25d3b5968706445 (patch)
treedeb43fbe1df5d54fcefe1328f3b07b88d976f4cc /winsup/utils
parent5e087a83734fac4674a45a8ca8dd7e8bb1eb5d5e (diff)
downloadnewlib-cf01b8f0290eacb35d2c5206b25d3b5968706445.zip
newlib-cf01b8f0290eacb35d2c5206b25d3b5968706445.tar.gz
newlib-cf01b8f0290eacb35d2c5206b25d3b5968706445.tar.bz2
tzset: Fix array length given to GetGeoInfoW
Fixes Coverity CID 66916 Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/tzset.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/utils/tzset.c b/winsup/utils/tzset.c
index 02ac5f3..b7fd1ae 100644
--- a/winsup/utils/tzset.c
+++ b/winsup/utils/tzset.c
@@ -195,7 +195,7 @@ main (int argc, char **argv)
*country = L'\0';
geo = GetUserGeoID (GEOCLASS_NATION);
if (geo != GEOID_NOT_AVAILABLE)
- GetGeoInfoW (geo, GEO_ISO2, country, sizeof country, 0);
+ GetGeoInfoW (geo, GEO_ISO2, country, sizeof country / sizeof (*country), 0);
/* If, for some reason, the Geo-location isn't available, we use the locale
setting instead. */
if (!*country)