public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Dmitriy Chestnyh <d.chestnyh@omp.ru>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: "libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: Re: [PATCH] [iconv] Fix possible null-pointer dereference.
Date: Thu, 31 Mar 2022 15:58:50 +0000	[thread overview]
Message-ID: <e4b4b288ef17415a9471acd8027dc52f@omp.ru> (raw)
In-Reply-To: <875ynuw1yf.fsf@igel.home>

So the patch may be useful?

________________________________
От: Andreas Schwab <schwab@linux-m68k.org>
Отправлено: 31 марта 2022 г. 18:56:08
Кому: Dmitriy Chestnyh
Копия: libc-alpha@sourceware.org
Тема: Re: [PATCH] [iconv] Fix possible null-pointer dereference.

On Mär 31 2022, Andreas Schwab wrote:

> On Mär 31 2022, Dmitry Chestnyh wrote:
>
>> diff --git a/iconv/skeleton.c b/iconv/skeleton.c
>> index 0356dbf92b..a296a9f944 100644
>> --- a/iconv/skeleton.c
>> +++ b/iconv/skeleton.c
>> @@ -659,6 +659,7 @@ FUNCTION_NAME (struct __gconv_step *step, struct __gconv_step_data *data,
>>             /* Store information about how many bytes are available.  */
>>             data->__outbuf = outbuf;
>>
>> +          assert(irreversible != NULL);
>>             /* Remember how many non-identical characters we
>>                converted in an irreversible way.  */
>>             *irreversible += lirreversible;
>
> I don't think this function is ever called with irreversible == NULL.
> In fact, there is such an assertion in __gconv.

Except that __gconv_transliterate does pass NULL here.

--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

  reply	other threads:[~2022-03-31 15:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31 15:19 Dmitry Chestnyh
2022-03-31 15:47 ` Andreas Schwab
2022-03-31 15:56   ` Andreas Schwab
2022-03-31 15:58     ` Dmitriy Chestnyh [this message]
2022-03-31 16:43       ` Andreas Schwab
  -- strict thread matches above, loose matches on Subject: below --
2022-03-31 12:55 [PATCH] iconv: " Dmitry Chestnyh
2022-03-31 13:24 ` Andreas Schwab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e4b4b288ef17415a9471acd8027dc52f@omp.ru \
    --to=d.chestnyh@omp.ru \
    --cc=libc-alpha@sourceware.org \
    --cc=schwab@linux-m68k.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).