groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] problem with preconv and sample_docs.mom


From: James K. Lowden
Subject: Re: [Groff] problem with preconv and sample_docs.mom
Date: Tue, 7 Nov 2017 22:55:57 -0500

On Sun, 05 Nov 2017 15:09:41 +0100
Bertrand Garrigues <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]