Page MenuHomeFreeBSD

socket_msg_trunc: allocate a large enough buffer
ClosedPublic

Authored by brooks on Jan 6 2024, 12:41 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Feb 27, 3:20 AM
Unknown Object (File)
Oct 8 2024, 10:54 AM
Unknown Object (File)
Oct 5 2024, 6:58 AM
Unknown Object (File)
Sep 20 2024, 2:34 PM
Unknown Object (File)
Sep 17 2024, 7:06 PM
Unknown Object (File)
Sep 12 2024, 12:00 AM
Unknown Object (File)
Sep 5 2024, 5:31 AM
Unknown Object (File)
Aug 21 2024, 4:21 PM
Subscribers

Details

Summary

Allocate 9000 bytes to match the largest requsted size. Add a check to
prevent the list of sizes and buffer size from getting out of sync
again.

Found with: CheriBSD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

It'd be a bit cleaner to allocate the buffer with malloc(), but this works.

tests/sys/kern/socket_msg_trunc.c
55
This revision is now accepted and ready to land.Jan 6 2024, 3:34 PM