Page MenuHomeFreeBSD

D12609.id33840.diff
No OneTemporary

D12609.id33840.diff

Index: head/usr.bin/patch/pch.c
===================================================================
--- head/usr.bin/patch/pch.c
+++ head/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

Mime Type
text/plain
Expires
Wed, Sep 2, 3:07 PM (18 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37949587
Default Alt Text
D12609.id33840.diff (515 B)

Event Timeline