This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: patch 2/2 debuginfod server etc.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]