aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/patch/patch.c
diff options
context:
space:
mode:
authorStephane E. Potvin <sepotvin@FreeBSD.org>2009-05-08 02:18:46 +0000
committerStephane E. Potvin <sepotvin@FreeBSD.org>2009-05-08 02:18:46 +0000
commit9ab20e104c725eb316253051ac826d1b5a8d8423 (patch)
tree866bcb97cc0bd25d3053cc96c7f8a37922b0ea14 /gnu/usr.bin/patch/patch.c
parentb4307a77d2662b3a213b6a2af27c5e10e2cde2b8 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/patch/patch.c')
-rw-r--r--gnu/usr.bin/patch/patch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gnu/usr.bin/patch/patch.c b/gnu/usr.bin/patch/patch.c
index 8e06c33beaf5..fbf7e709f266 100644
--- a/gnu/usr.bin/patch/patch.c
+++ b/gnu/usr.bin/patch/patch.c
@@ -155,6 +155,11 @@ char **argv;
for (i = 0; i<MAXFILEC; i++)
filearg[i] = Nullch;
+ buf_size = INITLINELEN;
+ buf = malloc((MEM)(buf_size));
+ if (buf == Nullch)
+ fatal1("out of memory\n");
+
myuid = getuid();
index_first = getenv ("PATCH_INDEX_FIRST") != 0;