Skip to content

Commit

Permalink
Bug #479 do not close STDIN when using pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Oct 24, 2018
1 parent eba0adf commit 597bf25
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions src/replay.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 597bf25

Please sign in to comment.