From nobody  Sun Jul 19 11:48:51 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id LAA07743;
          Sun, 19 Jul 1998 11:48:51 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199807191848.LAA07743@hub.freebsd.org>
Date: Sun, 19 Jul 1998 11:48:51 -0700 (PDT)
From: Anders.X.Thulin@telia.se
To: freebsd-gnats-submit@freebsd.org
Subject: routed/rtquery: bad pointer comparison
X-Send-Pr-Version: www-1.0

>Number:         7319
>Category:       bin
>Synopsis:       routed/rtquery: bad pointer comparison
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Jul 19 11:50:01 PDT 1998
>Closed-Date:    Tue Jul 21 22:49:49 PDT 1998
>Last-Modified:  Tue Jul 21 22:50:26 PDT 1998
>Originator:     Anders Thulin
>Release:        2.2.6 (Walnut Creek CD)
>Organization:
(none)
>Environment:
FreeBSD myname.my.domain 2.2.6-RELEASE FreeBSD 2.2.6-RELEASE #0: Wed Mar 25 02:28:49 GMT 1998
     jkh@time.cdrom.com:/usr/src/sys/compile/GENERIC  i386
>Description:
/usr/src/sbin/routed/parms.c and .../routed/rtquery/rtquery.c both
contain code that compare a char pointer with a char.
  As this doesn't make much sense, it looks very much as if a '*'
has been dropped by mistake.
  I have made no analysis of the possible consequences of the problem.

>How-To-Repeat:
Not applicable -- I discovered the problem while linting the code.


>Fix:
.../routed/parms.c:
379c379
< 		if (c == '\\' && pc != '\0') {
---
> 		if (c == '\\' && *pc != '\0') {

.../routed/rtquery/rtquery.c:
809c809
< 		if (c == '\\' && pc != '\0') {
---
> 		if (c == '\\' && *pc != '\0') {

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Tue Jul 21 22:49:49 PDT 1998 
State-Changed-Why:  
fixed, thanks. 

please use context diffs (diff -u or -c) in the future. 
>Unformatted:
