https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
--- Comment #6 from Dmitry Vyukov ---
It seems to me that compiler is fine here and we just have a bug in kernel
code.
Result of strlen called on char[16] can't possibly by >15 (without causing
undefined behavior -- reading past the end of the ob
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
--- Comment #5 from Andrew Pinski ---
(In reply to Kees Cook from comment #4)
> But it's optimizing away the check.
That what undefined means.
> If strlen() were suddenly acting like
> strnlen(), that'd be one thing, but the return value from
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
--- Comment #4 from Kees Cook ---
But it's optimizing away the check. If strlen() were suddenly acting like
strnlen(), that'd be one thing, but the return value from strlen() is being
used by the memcpy() without the actual test in between. That'
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
Kees Cook changed:
What|Removed |Added
Status|RESOLVED|UNCONFIRMED
Resolution|INVALID
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85310
Andrew Pinski changed:
What|Removed |Added
Status|UNCONFIRMED |RESOLVED
Resolution|---