From d3774b9d94888f0956b43a540facec121df1af14 Mon Sep 17 00:00:00 2001 From: Roland Illig Date: Mon, 11 Oct 2004 21:53:30 +0000 Subject: [PATCH] * utilunix.c (close_error_pipe): Fixed possible invalid memory access (three lines below). --- src/ChangeLog | 5 +++++ src/utilunix.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ChangeLog b/src/ChangeLog index 0086ddbcd..2c237fc18 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-10-11 Roland Illig + + * utilunix.c (close_error_pipe): Fixed possible invalid memory access + (three lines below). + 2004-10-11 Leonard den Ottolander * file.c (copy_dir_dir): Small text fix. diff --git a/src/utilunix.c b/src/utilunix.c index baf728e5e..2375a98a8 100644 --- a/src/utilunix.c +++ b/src/utilunix.c @@ -436,7 +436,7 @@ close_error_pipe (int error, const char *text) close (2); dup (old_error); close (old_error); - len = read (error_pipe[0], msg, MAX_PIPE_SIZE); + len = read (error_pipe[0], msg, MAX_PIPE_SIZE - 1); if (len >= 0) msg[len] = 0;