beberlei / assert

Thin assertion library for use in libraries and business-model
Other
2.41k stars 186 forks source link

`Assertion::uuid` assertion generates fatal error #316

Closed marcosh closed 3 years ago

marcosh commented 3 years ago

Consider the case where the uuid method receives a value containing a %s segment.

It is not a valid uuid the code catches a thrown exception and uses the stacktrace as the error message.

That stacktrace will possibly contain multiple times the %s in the initial uuid.

When sprintf is called, this causes a fatal error