From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: devel@driverdev.osuosl.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
speakup@braille.uwo.ca
Subject: Re: [PATCH v3 1/2] staging: speakup: reuse native hex2bin()
Date: Tue, 9 Apr 2013 17:38:10 +0200 [thread overview]
Message-ID: <20130409153810.GC5110@type> (raw)
In-Reply-To: <1365510136-15288-1-git-send-email-andriy.shevchenko@linux.intel.com>
Andy Shevchenko, le Tue 09 Apr 2013 15:22:15 +0300, a écrit :
> @@ -349,21 +349,8 @@ char *spk_xlate(char *s)
> num = (*p1++)&7;
> }
> *p++ = num;
> - } else if (*p1 == 'x' &&
> - strchr(hx, p1[1]) && strchr(hx, p1[2])) {
...
> + } else if (*p1 == 'x' && !hex2bin(&num, p1 + 1, 1)) {
> + p1 += 3;
Checking it again, I realize that this does not check p1[1]!=0 and
p1[2]!=0 any more ; it has to because hex2bin does not perform the
check (and could thus erroneously dereference p1[2]).
Samuel
next parent reply other threads:[~ UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1365510136-15288-1-git-send-email-andriy.shevchenko@linux.intel.com>
` Samuel Thibault [this message]
[not found] ` <1365510136-15288-2-git-send-email-andriy.shevchenko@linux.intel.com>
` [PATCH v3 2/2] staging: speakup: fix a bug when translate octal numbers Samuel Thibault
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=20130409153810.GC5110@type \
--to=samuel.thibault@ens-lyon.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=speakup@braille.uwo.ca \
--cc=speakup@linux-speakup.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).