aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2002-05-29 02:11:57 +0000
committerGuy Harris <guy@alum.mit.edu>2002-05-29 02:11:57 +0000
commit2e936ea423ad84b5755994a0d28dfeb35a9c6589 (patch)
treea8b826c0072353a7cc2af96539a4e29a79dfa5c8 /wiretap
parent12bc4ef56d904f87dd0e84171a4f2d4944d8c2f2 (diff)
Fail somewhat more gracefully when confronted with a bad file.
svn path=/trunk/; revision=5584
Diffstat (limited to 'wiretap')
-rw-r--r--wiretap/pppdump.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/wiretap/pppdump.c b/wiretap/pppdump.c
index 2997759040..d11aeaf6bd 100644
--- a/wiretap/pppdump.c
+++ b/wiretap/pppdump.c
@@ -1,6 +1,6 @@
/* pppdump.c
*
- * $Id: pppdump.c,v 1.17 2002/03/05 08:39:29 guy Exp $
+ * $Id: pppdump.c,v 1.18 2002/05/29 02:11:57 guy Exp $
*
* Copyright (c) 2000 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@@ -508,7 +508,9 @@ collate(pppdump_t* state, FILE_T fh, int *err, guint8 *pd, int *num_bytes,
default:
/* XXX - bad file */
- g_assert_not_reached();
+ g_message("pppdump: bad ID byte 0x%02x", id);
+ *err = WTAP_ERR_BAD_RECORD;
+ return FALSE;
}
}