help-libidn
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix unlikely memory leak in idna_to_unicode_4z4z


From: Tim Rühsen
Subject: Re: [PATCH] Fix unlikely memory leak in idna_to_unicode_4z4z
Date: Tue, 10 Jul 2018 16:43:32 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0

Thanks for your contribution !

The change has been pushed to master.

Regards, Tim

On 07/10/2018 04:09 PM, Miroslav Lichvar wrote:
> ---
>  lib/idna.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/lib/idna.c b/lib/idna.c
> index 91e34f59..fae707cc 100644
> --- a/lib/idna.c
> +++ b/lib/idna.c
> @@ -658,7 +658,10 @@ idna_to_unicode_4z4z (const uint32_t * input, uint32_t 
> ** output, int flags)
>        buflen = (size_t) (end - start);
>        buf = malloc (sizeof (buf[0]) * (buflen + 1));
>        if (!buf)
> -     return IDNA_MALLOC_ERROR;
> +     {
> +       free (out);
> +       return IDNA_MALLOC_ERROR;
> +     }
>  
>        /* don't check return code as per specification! */
>        idna_to_unicode_44i (start, (size_t) (end - start),
> 

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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