Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148940619
D10377.id27413.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
345 B
Referenced Files
None
Subscribers
None
D10377.id27413.diff
View Options
Index: head/lib/libc/gen/ttyname.c
===================================================================
--- head/lib/libc/gen/ttyname.c
+++ head/lib/libc/gen/ttyname.c
@@ -61,6 +61,10 @@
{
size_t used;
+ /* Don't write off the end of a zero-length buffer. */
+ if (len < 1)
+ return (ERANGE);
+
*buf = '\0';
/* Must be a terminal. */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 4:39 AM (14 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30107922
Default Alt Text
D10377.id27413.diff (345 B)
Attached To
Mode
D10377: Fix an out-of-bounds write when a zero-length buffer is passed.
Attached
Detach File
Event Timeline
Log In to Comment