From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#13827: faulty range check in bytevector accessor Date: Wed, 13 Mar 2013 15:37:56 +0100 Message-ID: <87mwu7fjqz.fsf@pobox.com> References: <87liaay0o1.fsf@Kagami.home> <87k3pbh32l.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1363185551 12700 80.91.229.3 (13 Mar 2013 14:39:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Mar 2013 14:39:11 +0000 (UTC) Cc: 13827@debbugs.gnu.org To: Ian Price Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Wed Mar 13 15:39:36 2013 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UFmq5-0005hm-RE for guile-bugs@m.gmane.org; Wed, 13 Mar 2013 15:39:33 +0100 Original-Received: from localhost ([::1]:52884 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFmpj-00073q-49 for guile-bugs@m.gmane.org; Wed, 13 Mar 2013 10:39:11 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:56217) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFmpd-00073G-Vc for bug-guile@gnu.org; Wed, 13 Mar 2013 10:39:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UFmpX-0002eX-2P for bug-guile@gnu.org; Wed, 13 Mar 2013 10:39:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47268) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UFmpW-0002eN-SX for bug-guile@gnu.org; Wed, 13 Mar 2013 10:38:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UFmqZ-0000Ii-Rr for bug-guile@gnu.org; Wed, 13 Mar 2013 10:40:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andy Wingo Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-guile@gnu.org Resent-Date: Wed, 13 Mar 2013 14:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13827 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 13827-submit@debbugs.gnu.org id=B13827.13631855511092 (code B ref 13827); Wed, 13 Mar 2013 14:40:02 +0000 Original-Received: (at 13827) by debbugs.gnu.org; 13 Mar 2013 14:39:11 +0000 Original-Received: from localhost ([127.0.0.1]:51377 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFmpg-0000HW-UQ for submit@debbugs.gnu.org; Wed, 13 Mar 2013 10:39:10 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:62735 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UFmpd-0000HN-6s for 13827@debbugs.gnu.org; Wed, 13 Mar 2013 10:39:06 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 20D92BD11; Wed, 13 Mar 2013 10:37:59 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=EpuHUh1v7EZczsZNuEDNGQg1ry4=; b=imCAlG qJQDOQdlWw6M6scbAoOTMLDw6nYjesiCYq9KHlN/sZlaFVtAEDKhdfQhz/nkWMA4 52moEGTEWvGJKuOSetFbZn8wgBBj2W8D6dEuv8XfRhM/mb8+SqMD8+WcHLLU8NC6 ZancnxZOfQBup+lEd7Q+4ifa91skWplIADgpA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=LnSVadbDdgsu3/tNaGpNPq9ZG+bCDATg OglDoqDLq80iCpuSLEaXWg9XX3s+n8mVzkBalCK6Geru1Q6mr7DLHFBouOuHIh2i ZjLSUDai9ITwQyeQHr/m+njBvHILHEjb3HYAjaXIIWiHes612DzEkaMi+6JR2BLQ 5TED66H6Vos= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 1A12FBD10; Wed, 13 Mar 2013 10:37:59 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 949E7BD0F; Wed, 13 Mar 2013 10:37:58 -0400 (EDT) In-Reply-To: <87k3pbh32l.fsf@pobox.com> (Andy Wingo's message of "Wed, 13 Mar 2013 13:55:14 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 99BC0FD0-8BEB-11E2-9F90-59240E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:6953 Archived-At: On Wed 13 Mar 2013 13:55, Andy Wingo writes: > - if (SCM_UNLIKELY (c_index + ((_len) >> 3UL) - 1 >= c_len)) \ > + if (SCM_UNLIKELY (c_index >= c_len)) \ > scm_out_of_range (FUNC_NAME, index); I see the intention was to take into account the size of the access (e.g. 32 bits). Confusing with len, _len, and c_len... -- http://wingolog.org/