diff options
author | Aaro Koskinen | 2016-11-22 00:19:50 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-11-24 11:38:56 +0100 |
commit | 2eff59667d3c590f27ee39cd0969b2221af739a0 (patch) | |
tree | effde9a154e1ba62f5e72bc5ec9fed822dc4ee90 | |
parent | 5bbee27c0fcafe60f43a294afa1352b5ddcab6f3 (diff) | |
download | busybox-2eff59667d3c590f27ee39cd0969b2221af739a0.zip busybox-2eff59667d3c590f27ee39cd0969b2221af739a0.tar.gz |
patch: fix debug log failure
If we reach the end of plist it means the input has still data while we
are expecting EOF. Fix the log to avoid a crash.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | editors/patch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editors/patch.c b/editors/patch.c index 988021d..4ee9339 100644 --- a/editors/patch.c +++ b/editors/patch.c @@ -295,7 +295,7 @@ static int apply_one_hunk(void) // recheck remaining buffered data for a new match. if (PATCH_DEBUG) - fdprintf(2, "NOT: %s\n", plist->data); + fdprintf(2, "NOT: %s\n", plist ? plist->data : "EOF"); TT.state = 3; check = buf; |