commit fd9f4a2de0e0bb2450a8afeae120a4b14ae10272 from: Hiltjo Posthuma date: Wed Aug 28 17:15:36 2019 UTC tog: mbs2ws: fix sizeof of element for memory allocation commit - 6772cf22207374c163d3fc80a65d5010ead394b8 commit + fd9f4a2de0e0bb2450a8afeae120a4b14ae10272 blob - fbc6df447875424b0d5974612adb03ccbb793fdf blob + 18db59088b6aecbd0b3e5802bb0b385133f1ddf6 --- tog/tog.c +++ tog/tog.c @@ -907,7 +907,7 @@ mbs2ws(wchar_t **ws, size_t *wlen, const char *s) } } - *ws = calloc(*wlen + 1, sizeof(*ws)); + *ws = calloc(*wlen + 1, sizeof(**ws)); if (*ws == NULL) { err = got_error_from_errno("calloc"); goto done;