Subject: Re: [Boost-bugs] [Boost C++ Libraries] #12253: UUID Valid String Semantics are Erratic
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-07-20 18:49:56
#12253: UUID Valid String Semantics are Erratic
---------------------------------+---------------------------
Reporter: Aaron <dartme18@â¦> | Owner: Andy Tompkins
Type: Bugs | Status: new
Milestone: Boost 1.61.0 | Component: uuid
Version: Boost 1.60.0 | Severity: Problem
Resolution: | Keywords:
---------------------------------+---------------------------
Comment (by jim.king@â¦):
I can confirm this behavior in boost 1.62 as well:
{{{
//! Convert a string to a GUID
inline GUID stog(const std::string& gs)
{
BOOST_STATIC_ASSERT(sizeof(GUID) == sizeof(boost::uuids::uuid));
GUID result;
memcpy(&result, boost::uuids::string_generator()(gs).data,
sizeof(GUID));
return result;
}
}}}
Sitting in the debugger, we see I passed in an invalid uuid string but I
got back a GUID that has FFFF in place of the "zzzz" I put in there:
{{{
+ gs "83f8638b-8dca-4152-zzzz-2ca8b33039b4"
const
+ &result 0x0000005305f9ed38 {8B63F883-CA8D-5241-FFFF-2CA8B33039B4}
_GUID *
}}}
I would also like to see the parser here changed to be much more strict.
-- Ticket URL: <https://svn.boost.org/trac10/boost/ticket/12253#comment:2> Boost C++ Libraries <http://www.boost.org/> Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-07-20 18:55:53 UTC