Page MenuHomeFreeBSD

Don't run strcmp() against strings stored in user memory.
ClosedPublic

Authored by jhb on Apr 24 2020, 11:50 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Oct 27, 6:57 AM
Unknown Object (File)
Mon, Oct 27, 5:47 AM
Unknown Object (File)
Sun, Oct 26, 7:58 PM
Unknown Object (File)
Sun, Oct 26, 7:57 PM
Unknown Object (File)
Sun, Oct 26, 7:56 PM
Unknown Object (File)
Sun, Oct 26, 2:12 PM
Unknown Object (File)
Sep 16 2025, 2:31 AM
Unknown Object (File)
Sep 5 2025, 8:22 PM
Subscribers

Details

Summary

Instead, copy the strings into a temporary buffer on the stack and
run strcmp on the copies.

Test Plan
  • compile tested only

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable