From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1a2zLV-0005zS-Uj for mharc-qemu-trivial@gnu.org; Sun, 29 Nov 2015 05:36:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2zLU-0005xM-1L for qemu-trivial@nongnu.org; Sun, 29 Nov 2015 05:36:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2zLT-0007kB-7o for qemu-trivial@nongnu.org; Sun, 29 Nov 2015 05:36:39 -0500 Received: from isrv.corpit.ru ([86.62.121.231]:34834) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2zLN-0007jo-6l; Sun, 29 Nov 2015 05:36:33 -0500 Received: from tsrv.tls.msk.ru (tsrv.tls.msk.ru [192.168.177.2]) by isrv.corpit.ru (Postfix) with ESMTP id 44AD443237; Sun, 29 Nov 2015 13:36:22 +0300 (MSK) Received: from [192.168.88.2] (mjt.vpn.tls.msk.ru [192.168.177.99]) by tsrv.tls.msk.ru (Postfix) with ESMTP id 28D0AA68; Sun, 29 Nov 2015 13:36:22 +0300 (MSK) Message-ID: <565AD526.5040108@msgid.tls.msk.ru> Date: Sun, 29 Nov 2015 13:36:22 +0300 From: Michael Tokarev Organization: Telecom Service, JSC User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 MIME-Version: 1.0 To: John Snow , qemu-devel@nongnu.org References: <1448485417-8196-1-git-send-email-jsnow@redhat.com> In-Reply-To: <1448485417-8196-1-git-send-email-jsnow@redhat.com> OpenPGP: id=804465C5 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 86.62.121.231 Cc: qemu-trivial@nongnu.org, jcody@redhat.com Subject: Re: [Qemu-trivial] [PATCH v2] util/id: fully allocate names table X-BeenThere: qemu-trivial@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Nov 2015 10:36:40 -0000 26.11.2015 00:03, John Snow wrote: > Trivial: this array should be allocated to have ID_MAX entries always. > Otherwise if someone were to forget to expand this table, the assertion > in the id generator won't actually trigger; it will read junk data. Applied to -trivial as a bugfix, with a trivial commit description cleanup, removing this part: > v2: Fix the range assertion, too. Compare against the known actual size > of the table instead of what it "should" be. Thanks! /mjt From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2zLS-0005xH-Du for qemu-devel@nongnu.org; Sun, 29 Nov 2015 05:36:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2zLN-0007jy-ED for qemu-devel@nongnu.org; Sun, 29 Nov 2015 05:36:38 -0500 Message-ID: <565AD526.5040108@msgid.tls.msk.ru> Date: Sun, 29 Nov 2015 13:36:22 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1448485417-8196-1-git-send-email-jsnow@redhat.com> In-Reply-To: <1448485417-8196-1-git-send-email-jsnow@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] util/id: fully allocate names table List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, jcody@redhat.com 26.11.2015 00:03, John Snow wrote: > Trivial: this array should be allocated to have ID_MAX entries always. > Otherwise if someone were to forget to expand this table, the assertion > in the id generator won't actually trigger; it will read junk data. Applied to -trivial as a bugfix, with a trivial commit description cleanup, removing this part: > v2: Fix the range assertion, too. Compare against the known actual size > of the table instead of what it "should" be. Thanks! /mjt