On Sun, 05 Nov 2017 15:09:41 +0100
Bertrand Garrigues <bertrand.garrig...@laposte.net> wrote:

> +  /* uchardet 0.0.1 could return an empty string instead of NULL */
> +  if (charset && *charset) {
>      ret = (char *)calloc(strlen(charset) + 1, 1);
>      strcpy(ret, charset);
>    }

As a logical matter, the calloc call should have the count as the first
argument: 

        ret = (char *)calloc(1, strlen(charset) + 1);

--jkl

Reply via email to