Opened 5 years ago

Closed 10 months ago

#8630 closed Bugs (fixed)

uuid string generator accepts invalid uuids

Reported by: record.nctu.cis91@… Owned by: Andy Tompkins
Milestone: Boost 1.66.0 Component: uuid
Version: Boost 1.53.0 Severity: Problem
Keywords: uuid string generator Cc:


I've tried stream operator and string generator to convert string into uuids.
But the string generator one accepts some incorrect uuid representation.
For example, with the following strings:

  • "0000-0000-0000-0000-000000000000"
  • "------------------------------------"

String generator accepts but produce strange content, but stream operator will refuse them.

Maybe it's better to throw exception in such case?
To tell user such string is not a correct uuid representation.

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by anonymous

I think

char const* d = std::find(digits_begin, digits_end, c);
return values[d - digits_begin];

should be

char const* d = std::find(digits_begin, digits_end, c);
if (d == digits_end)
return values[d - digits_begin];

comment:2 Changed 11 months ago by James E. King, III <jking@…>

comment:3 Changed 10 months ago by James E. King, III

Milestone: To Be DeterminedBoost 1.66.0
Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Andy Tompkins.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.