diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c index 3a3400dd..f0df2f76 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -102,7 +102,7 @@ int get_utf8_argv(int *argc, char ***argv) if ((wgetmainargs = (wgetmainargs_t)GetProcAddress(handle, "__wgetmainargs")) == NULL) return 1; i = 0; if (wgetmainargs(&wargc, &wargv, &wenv, 1, &i) != 0) return 1; - if ((utf8argv = (char **)malloc(wargc*sizeof(char*))) == NULL) return 1; + if ((utf8argv = (char **)calloc(wargc, sizeof(char*))) == NULL) return 1; ret = 0; for (i=0; i