From: Florian Weimer <fweimer@redhat.com>
To: Stefan Liebler <stli@linux.ibm.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: [PATCH] Fix build warnings in locale/programs/ld-ctype.c
Date: Tue, 25 Jun 2019 15:39:09 +0200 [thread overview]
Message-ID: <87h88d239e.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <9110cd0d-ba40-5204-0ee3-cba1e9375035@linux.ibm.com> (Stefan Liebler's message of "Tue, 25 Jun 2019 15:33:18 +0200")
* Stefan Liebler:
> On 6/25/19 3:23 PM, Florian Weimer wrote:
>> * Stefan Liebler:
>>
>>> diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
>>> index e6105928da..cfc9c43fd5 100644
>>> --- a/locale/programs/ld-ctype.c
>>> +++ b/locale/programs/ld-ctype.c
>>> @@ -1396,7 +1396,8 @@ charclass_symbolic_ellipsis (struct linereader *ldfile,
>>> (int) (now->val.str.lenmb - (cp - last_str)),
>>> from);
>>> - get_character (now, charmap, repertoire, &seq, &wch);
>>> + if (get_character (now, charmap, repertoire, &seq, &wch))
>>> + goto invalid_range;
>>
>> Maybe write:
>>
>> if (get_character (now, charmap, repertoire, &seq, &wch) != 0)
>>
>> to match the other function calls?
> Okay. That's no problem. If no one opposes, I'll commit the patch
> tomorrow with "!= 0".
>
> Shall I also update the following occurrence in ctype_read?
> if (ellipsis_token == tok_none)
> {
> if (get_character (now, charmap, repertoire, &seq, &wch))
> goto err_label;
Oh, I had missed that. If the calls are already inconsistent, you can
use your original patch, too.
To be honest, I'm more concerned about the other calls to get_character
without error checking.
Thanks,
Florian
next prev parent reply other threads:[~2019-06-25 13:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 13:17 [PATCH] Fix build warnings in locale/programs/ld-ctype.c Stefan Liebler
2019-06-25 13:23 ` Florian Weimer
2019-06-25 13:33 ` Stefan Liebler
2019-06-25 13:39 ` Florian Weimer [this message]
2019-06-25 13:49 ` Stefan Liebler
2019-06-25 13:54 ` Florian Weimer
2019-06-26 10:32 ` Stefan Liebler
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h88d239e.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=stli@linux.ibm.com \
/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).