]> sourceware.org Git - newlib-cygwin.git/commitdiff
tzset: Fix array length given to GetGeoInfoW
authorCorinna Vinschen <corinna@vinschen.de>
Sun, 23 Oct 2016 14:45:21 +0000 (16:45 +0200)
committerCorinna Vinschen <corinna@vinschen.de>
Sun, 23 Oct 2016 14:45:21 +0000 (16:45 +0200)
Fixes Coverity CID 66916

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
winsup/utils/tzset.c

index 02ac5f3f20c9f252c31e4af6a94537ad0677cb9c..b7fd1aec23ef619e55f768f7d43acd49eafee278 100644 (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)
This page took 0.029877 seconds and 5 git commands to generate.