aboutsummaryrefslogtreecommitdiffstats
path: root/packet-lpd.c
diff options
context:
space:
mode:
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>1999-09-17 05:56:58 +0000
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>1999-09-17 05:56:58 +0000
commitaac8dad86023c314a06a0142e61b1f2c8c439e2e (patch)
tree7b49cc8eb0de5d9a929aa1676bc1981c3ebcfad3 /packet-lpd.c
parentc03993001759b8c3f5ef2c39eac83c86d02b80ab (diff)
Add a "BYTES_ARE_IN_FRAME()" macro, to test whether there are a
specified number of bytes of captured data in the frame at the specified offset, and a "IS_DATA_IN_FRAME()" macro, to test whether there are any bytes of captured data in the frame at the specified offset, and convert some bounds checks to use them. Add a dissector for the Internet Printing Protocol. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@685 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'packet-lpd.c')
-rw-r--r--packet-lpd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-lpd.c b/packet-lpd.c
index 016076cfe0..c5fb8aa031 100644
--- a/packet-lpd.c
+++ b/packet-lpd.c
@@ -2,7 +2,7 @@
* Routines for LPR and LPRng packet disassembly
* Gilbert Ramirez <gram@verdict.uthscsa.edu>
*
- * $Id: packet-lpd.c,v 1.9 1999/08/25 17:38:36 guy Exp $
+ * $Id: packet-lpd.c,v 1.10 1999/09/17 05:56:55 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@unicom.net>
@@ -127,7 +127,7 @@ dissect_lpd(const u_char *pd, int offset, frame_data *fd, proto_tree *tree)
printer = strdup(&pd[offset]);
line_pos = printer;
curr_offset = offset;
- while (pi.captured_len > curr_offset) {
+ while (IS_DATA_IN_FRAME(curr_offset)) {
newline = strchr(line_pos, '\n');
if (!newline) {
proto_tree_add_text(lpd_tree, curr_offset,