patch 2/2 debuginfod server etc.

Mark Wielaard mark@klomp.org
Fri Nov 15 11:03:00 GMT 2019


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") !=
> > string::npos)) // pure tasty lowercase hex
> > +    throw reportable_exception("invalid buildid");
> 
> 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



More information about the Elfutils-devel mailing list