diff options
-rw-r--r-- | pcap-usb-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcap-usb-linux.c b/pcap-usb-linux.c index 436a8452..9e7e8404 100644 --- a/pcap-usb-linux.c +++ b/pcap-usb-linux.c @@ -902,7 +902,7 @@ usb_read_linux(pcap_t *handle, int max_packets _U_, pcap_handler callback, u_cha char string_truncated[181]; strncpy(string_truncated, string, sizeof(string_truncated)); - string_truncated[180] = 0; + string_truncated[sizeof(string_truncated) - 1] = 0; snprintf(handle->errbuf, PCAP_ERRBUF_SIZE, "Can't parse USB bus message '%s', too few tokens (expected 8 got %d)", string_truncated, ret); |