tzset: Fix array length given to GetGeoInfoW

Fixes Coverity CID 66916

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2016-10-23 16:45:21 +02:00
parent 5e087a8373
commit cf01b8f029
1 changed files with 1 additions and 1 deletions

View File

@ -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)