$NetBSD: patch-aj,v 1.6 2001/05/24 17:00:58 abs Exp $ --- etc/atalkd/nbp.c.orig Sun Dec 13 05:22:42 1998 +++ etc/atalkd/nbp.c @@ -110,7 +110,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 1; } @@ -119,7 +119,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 1; } @@ -128,7 +128,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 1; }