aboutsummaryrefslogtreecommitdiffstats
path: root/text2pcap.c
diff options
context:
space:
mode:
Diffstat (limited to 'text2pcap.c')
-rw-r--r--text2pcap.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 7bf8f44854..860e9219d7 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -930,7 +930,8 @@ parse_preamble (void)
i++;
}
packet_preamble_len -= i;
- memmove(packet_preamble, packet_preamble+i, packet_preamble_len);
+ /* Also move the trailing '\0'. */
+ memmove(packet_preamble, packet_preamble + i, packet_preamble_len + 1);
}