summaryrefslogtreecommitdiff
path: root/wiretap/i4btrace.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2011-12-13 09:53:50 +0000
committerGuy Harris <guy@alum.mit.edu>2011-12-13 09:53:50 +0000
commitd94bd07f99438278cb11f24b00571ab2907b6bdb (patch)
tree5f96d0a35c97af466bcb2d5b8a9371327bb0190f /wiretap/i4btrace.c
parent1df4ee91090e35c25835204d7175b9395be32606 (diff)
downloadwireshark-d94bd07f99438278cb11f24b00571ab2907b6bdb.tar.gz
Rename WTAP_ERR_BAD_RECORD to WTAP_ERR_BAD_FILE; it really reports any
form of corruption/bogosity in a file, including in a file header as well as in records in the file. Change the error message wtap_strerror() returns for it to reflect that. Use it for some file header problems for which it wasn't already being used - WTAP_ERR_UNSUPPORTED shouldn't be used for that, it should only be used for files that we have no reason to believe are invalid but that have a version number we don't know about or some other non-link-layer-encapsulation-type value we don't know about. svn path=/trunk/; revision=40175
Diffstat (limited to 'wiretap/i4btrace.c')
-rw-r--r--wiretap/i4btrace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/i4btrace.c b/wiretap/i4btrace.c
index ac2336ce40..ce6421aefc 100644
--- a/wiretap/i4btrace.c
+++ b/wiretap/i4btrace.c
@@ -139,7 +139,7 @@ static gboolean i4btrace_read(wtap *wth, int *err, gchar **err_info,
wth->data_offset += sizeof hdr;
i4b_byte_swap_header(wth, &hdr);
if (hdr.length < sizeof(hdr)) {
- *err = WTAP_ERR_BAD_RECORD; /* record length < header! */
+ *err = WTAP_ERR_BAD_FILE; /* record length < header! */
*err_info = g_strdup_printf("i4btrace: record length %u < header length %lu",
hdr.length, (unsigned long)sizeof(hdr));
return FALSE;
@@ -150,7 +150,7 @@ static gboolean i4btrace_read(wtap *wth, int *err, gchar **err_info,
* Probably a corrupt capture file; don't blow up trying
* to allocate space for an immensely-large packet.
*/
- *err = WTAP_ERR_BAD_RECORD;
+ *err = WTAP_ERR_BAD_FILE;
*err_info = g_strdup_printf("i4btrace: File has %u-byte packet, bigger than maximum of %u",
length, WTAP_MAX_PACKET_SIZE);
return FALSE;