Date: Wed, 24 Apr 2002 23:27:34 -0700 (PDT) From: David Xu <davidx@viasoft.com.cn> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/37443: incorrect move pointer in environment string table Message-ID: <200204250627.g3P6RYu59757@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 37443 >Category: kern >Synopsis: incorrect move pointer in environment string table >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Apr 24 23:30:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: David Xu >Release: FreeBSD 5.0-CURRENT >Organization: Viatech >Environment: System: FreeBSD davidbsd.viasoft.com.cn 5.0-CURRENT FreeBSD 5.0-CURRENT #12: Thu Apr 25 13:28:32 CST 2002 root@davidbsd.viasoft.com.cn:/usr/src/sys/i386/compile/xu i386 >Description: in file /sys/kern/subr_hints.c, when res_find() searches string in dynamic environment string table, it losts an 'else' to avoid moving string pointer which should only be executed when using static environment table. >How-To-Repeat: >Fix: --- /usr/src/sys/kern/subr_hints.c.orig Thu Apr 25 13:24:34 2002 +++ /usr/src/sys/kern/subr_hints.c Thu Apr 25 13:25:25 2002 @@ -150,12 +150,14 @@ break; if (use_kenv) cp = kenvp[++i]; - while (*cp != '\0') + else { + while (*cp != '\0') + cp++; cp++; - cp++; - if (*cp == '\0') { - cp = NULL; - break; + if (*cp == '\0') { + cp = NULL; + break; + } } } if (use_kenv) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204250627.g3P6RYu59757>