Page MenuHomeFreeBSD

D12609.id33761.diff
No OneTemporary

D12609.id33761.diff

Index: usr.bin/patch/pch.c
===================================================================
--- usr.bin/patch/pch.c
+++ usr.bin/patch/pch.c
@@ -1135,11 +1135,15 @@
if (*buf != '>')
fatal("> expected at line %ld of patch\n",
p_input_line);
- p_line[i] = savestr(buf + 2);
- if (out_of_mem) {
- p_end = i - 1;
- return false;
- }
+ /* Don't overrun if we don't have enough line */
+ if (len > 2) {
+ p_line[i] = savestr(buf + 2);
+ if (out_of_mem) {
+ p_end = i - 1;
+ return false;
+ }
+ } else
+ p_line[i] = savestr("");
p_len[i] = strlen(p_line[i]);
p_char[i] = '+';
}

File Metadata

Mime Type
text/plain
Expires
Wed, Aug 26, 3:25 PM (12 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37307026
Default Alt Text
D12609.id33761.diff (645 B)

Event Timeline