[PATCH] [iconv] Fix possible null-pointer dereference.
Andreas Schwab
schwab@linux-m68k.org
Thu Mar 31 15:56:08 GMT 2022
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."
More information about the Libc-alpha
mailing list