From Bernd Leibing: catch another place where we weren't checking
[obnox/wireshark/wip.git] / packet-nntp.c
index 67dbaad2fdc0865d74a0d2df467cd0f2dfed57bc..1311546d8700dc73dee33c596157274b5410f083 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for nntp packet dissection
  * Copyright 1999, Richard Sharpe <rsharpe@ns.aus.com>
  *
- * $Id: packet-nntp.c,v 1.24 2002/01/24 09:20:50 guy Exp $
+ * $Id: packet-nntp.c,v 1.27 2002/08/28 21:00:24 jmayer Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version 2
  * of the License, or (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
- * 
+ *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <stdio.h>
 
-#ifdef HAVE_SYS_TYPES_H
-# include <sys/types.h>
-#endif
-
-#ifdef HAVE_NETINET_IN_H
-# include <netinet/in.h>
-#endif
-
 #include <string.h>
 #include <glib.h>
 #include <epan/packet.h>
@@ -77,7 +69,8 @@ dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                 * is not longer than what's in the buffer, so the
                 * "tvb_get_ptr()" call won't throw an exception.
                 */
-               linelen = tvb_find_line_end(tvb, offset, -1, &next_offset);
+               linelen = tvb_find_line_end(tvb, offset, -1, &next_offset,
+                   FALSE);
                col_add_fstr(pinfo->cinfo, COL_INFO, "%s: %s", type,
                    tvb_format_text(tvb, offset, linelen));
        }
@@ -107,7 +100,8 @@ dissect_nntp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
                        /*
                         * Find the end of the line.
                         */
-                       tvb_find_line_end(tvb, offset, -1, &next_offset);
+                       tvb_find_line_end(tvb, offset, -1, &next_offset,
+                           FALSE);
 
                        /*
                         * Put this line.
@@ -138,7 +132,7 @@ proto_register_nntp(void)
                &ett_nntp,
        };
 
-       proto_nntp = proto_register_protocol("Network News Transfer Protocol", 
+       proto_nntp = proto_register_protocol("Network News Transfer Protocol",
            "NNTP", "nntp");
        proto_register_field_array(proto_nntp, hf, array_length(hf));
        proto_register_subtree_array(ett, array_length(ett));