From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from speech.braille.uwo.ca (speech.braille.uwo.ca [129.100.249.132]) by befuddled.reisers.ca (Postfix) with ESMTP id EC37E1EF6A9 for ; Tue, 9 Apr 2013 15:02:04 -0400 (EDT) Received: by speech.braille.uwo.ca (Postfix) id 8C47FC1A17C; Tue, 9 Apr 2013 15:01:28 -0400 (EDT) Received: from toccata.ens-lyon.org (toccata.ens-lyon.fr [140.77.166.68]) by speech.braille.uwo.ca (Postfix) with ESMTP id 63A0EC1A076 for ; Tue, 9 Apr 2013 15:01:28 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by toccata.ens-lyon.org (Postfix) with ESMTP id E0335840A1; Tue, 9 Apr 2013 21:01:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at toccata.ens-lyon.org Received: from toccata.ens-lyon.org ([127.0.0.1]) by localhost (toccata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nkZeVBQ+0x+j; Tue, 9 Apr 2013 21:01:17 +0200 (CEST) Received: from type.ipv6 (youpi.is-a-geek.org [80.67.176.89]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by toccata.ens-lyon.org (Postfix) with ESMTPSA id 958818409B; Tue, 9 Apr 2013 21:01:17 +0200 (CEST) Received: from samy by type.ipv6 with local (Exim 4.80) (envelope-from ) id 1UPacc-0001Wr-4u; Tue, 09 Apr 2013 17:38:10 +0200 Date: Tue, 9 Apr 2013 17:38:10 +0200 From: Samuel Thibault To: Andy Shevchenko Subject: Re: [PATCH v3 1/2] staging: speakup: reuse native hex2bin() Message-ID: <20130409153810.GC5110@type> References: <1365510136-15288-1-git-send-email-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1365510136-15288-1-git-send-email-andriy.shevchenko@linux.intel.com> User-Agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) Cc: devel@driverdev.osuosl.org, Greg Kroah-Hartman , speakup@braille.uwo.ca X-BeenThere: speakup@linux-speakup.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: "Speakup is a screen review system for Linux." List-Id: "Speakup is a screen review system for Linux." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Apr 2013 19:02:07 -0000 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