From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22991 invoked by alias); 15 Nov 2019 11:03:39 -0000 Mailing-List: contact elfutils-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: elfutils-devel-owner@sourceware.org Received: (qmail 22980 invoked by uid 89); 15 Nov 2019 11:03:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=tasty X-Spam-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 15 Nov 2019 11:03:37 +0000 Received: from tarox.wildebeest.org (tarox.wildebeest.org [172.31.17.39]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by gnu.wildebeest.org (Postfix) with ESMTPSA id 5427E300073F; Fri, 15 Nov 2019 12:03:35 +0100 (CET) Received: by tarox.wildebeest.org (Postfix, from userid 1000) id 0BA54400114A; Fri, 15 Nov 2019 12:03:35 +0100 (CET) Message-ID: Subject: Re: patch 2/2 debuginfod server etc. From: Mark Wielaard To: "Frank Ch. Eigler" , elfutils-devel@sourceware.org Cc: amerey@redhat.com Date: Fri, 15 Nov 2019 11:03:00 -0000 In-Reply-To: References: <20191028190438.GC14349@redhat.com> <20191028190602.GD14349@redhat.com> <20191028190726.GE14349@redhat.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.28.5 (3.28.5-5.el7) Mime-Version: 1.0 X-Spam-Flag: NO X-IsSubscribed: yes X-SW-Source: 2019-q4/txt/msg00139.txt.bz2 On Thu, 2019-11-14 at 21:44 +0100, Mark Wielaard wrote: > > + // validate buildid > > + if ((buildid.size() < 2) || // not empty > > + (buildid.size() % 2) || // even number > > + (buildid.find_first_not_of("0123456789abcdef") !=3D > > string::npos)) // pure tasty lowercase hex > > + throw reportable_exception("invalid buildid"); >=20 > The % 2 check is good. I don't think we do that everywhere. > The lowercase hex seems a little arbitrary. Maybe first tolower then > check? That is just silly advise. Lets not encourage representation of build- id hex-strings with uppercase letters. The file representation is also all lowercase. Please ignore. Sorry, Mark