Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F159489310
D12609.id33762.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
500 B
Referenced Files
None
Subscribers
None
D12609.id33762.diff
View Options
Index: usr.bin/patch/pch.c
===================================================================
--- usr.bin/patch/pch.c
+++ usr.bin/patch/pch.c
@@ -1135,7 +1135,12 @@
if (*buf != '>')
fatal("> expected at line %ld of patch\n",
p_input_line);
- p_line[i] = savestr(buf + 2);
+ /* Don't overrun if we don't have enough line */
+ if (len > 2)
+ p_line[i] = savestr(buf + 2);
+ else
+ p_line[i] = savestr("");
+
if (out_of_mem) {
p_end = i - 1;
return false;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jun 15, 8:22 PM (13 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33974662
Default Alt Text
D12609.id33762.diff (500 B)
Attached To
Mode
D12609: patch(1): Don't overrun line buffer if line is not completely malformed
Attached
Detach File
Event Timeline
Log In to Comment