From cf01b8f0290eacb35d2c5206b25d3b5968706445 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sun, 23 Oct 2016 16:45:21 +0200 Subject: [PATCH] tzset: Fix array length given to GetGeoInfoW Fixes Coverity CID 66916 Signed-off-by: Corinna Vinschen --- winsup/utils/tzset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/winsup/utils/tzset.c b/winsup/utils/tzset.c index 02ac5f3f2..b7fd1aec2 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)