summaryrefslogtreecommitdiff
path: root/net/netatalk/patches/patch-ae
blob: a824bf23677639b736948584fa0fe0bec59159ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
$NetBSD: patch-ae,v 1.2 1999/08/31 22:09:42 wrstuden Exp $

--- etc/atalkd/nbp.c	Mon Oct 27 14:28:43 1997
+++ etc/atalkd/nbp.c	Mon Aug 30 06:52:31 1999
@@ -86,7 +86,7 @@
     nn.nn_sat.sat_port = nt.nt_port;
 
     /* object */
-    if ( data >= end || ( *data < 0 || *data > 32 ) || data + *data > end ) {
+    if ( data >= end || (*(unsigned char *)data > 32 ) || data + *data > end ) {
 	syslog( LOG_INFO, "nbp_packet: malformed packet" );
 	return;
     }
@@ -95,7 +95,7 @@
     data += nn.nn_objlen;
 
     /* type */
-    if ( data >= end || ( *data < 0 || *data > 32 ) || data + *data > end ) {
+    if ( data >= end || (*(unsigned char *)data > 32 ) || data + *data > end ) {
 	syslog( LOG_INFO, "nbp_packet: malformed packet" );
 	return;
     }
@@ -104,7 +104,7 @@
     data += nn.nn_typelen;
 
     /* zone */
-    if ( data >= end || ( *data < 0 || *data > 32 ) || data + *data > end ) {
+    if ( data >= end || (*(unsigned char *)data > 32 ) || data + *data > end ) {
 	syslog( LOG_INFO, "nbp_packet: malformed packet" );
 	return;
     }