From 597bf25350ed3a7cc49d46ba97c3a300b0ecbc48 Mon Sep 17 00:00:00 2001 From: Fred Klassen Date: Wed, 24 Oct 2018 11:28:43 -0700 Subject: [PATCH] Bug #479 do not close STDIN when using pipe --- docs/CHANGELOG | 1 + src/replay.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/CHANGELOG b/docs/CHANGELOG index c753dbb7b..628cf0346 100644 --- a/docs/CHANGELOG +++ b/docs/CHANGELOG @@ -6,6 +6,7 @@ - CVE-2018-17580 heap-buffer-overflow fast_edit_packet (#485) - CVE-2018-17582 heap-buffer-overflow in get_next_packet (#484) - Out-of-tree build (#482) + - Closing stdin on pipe (#479) - Second pcap file hangs on multipler option (#472) - Jumbo frame support for fragroute option (#466) - Add ability to change tcp SEQ/ACK numbers (#425) diff --git a/src/replay.c b/src/replay.c index 018c6be92..cb2f001ab 100644 --- a/src/replay.c +++ b/src/replay.c @@ -125,10 +125,6 @@ replay_file(tcpreplay_t *ctx, int idx) path = ctx->options->sources[idx].filename; - /* close stdin if reading from it (needed for some OS's) */ - if (strncmp(path, "-", 1) == 0) - close(1); - /* read from pcap file if we haven't cached things yet */ if (!ctx->options->preload_pcap) { if ((pcap = pcap_open_offline(path, ebuf)) == NULL) {