svn commit: r273552 - head/sys/kern

2014-10-23 Thread Xin LI
Author: delphij Date: Thu Oct 23 18:23:50 2014 New Revision: 273552 URL: https://svnweb.freebsd.org/changeset/base/273552 Log: Test if 'env' is NULL before doing memset() and strlen(), the caller may pass NULL to freeenv(). Modified: head/sys/kern/kern_environment.c Modified:

Re: svn commit: r273552 - head/sys/kern

2014-10-23 Thread Dag-Erling Smørgrav
Xin LI delp...@freebsd.org writes: Log: Test if 'env' is NULL before doing memset() and strlen(), the caller may pass NULL to freeenv(). If this is in response to a panic in early boot, the real bug is elsewhere (see r273564). Adding a NULL check here only hides it. DES -- Dag-Erling

Re: svn commit: r273552 - head/sys/kern

2014-10-23 Thread Xin Li
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 10/23/14 15:47, Dag-Erling Smørgrav wrote: Xin LI delp...@freebsd.org writes: Log: Test if 'env' is NULL before doing memset() and strlen(), the caller may pass NULL to freeenv(). If this is in response to a panic in early boot, the real

Re: svn commit: r273552 - head/sys/kern

2014-10-23 Thread Mateusz Guzik
On Thu, Oct 23, 2014 at 04:19:05PM -0700, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 10/23/14 15:47, Dag-Erling Smørgrav wrote: Xin LI delp...@freebsd.org writes: Log: Test if 'env' is NULL before doing memset() and strlen(), the caller may pass NULL to freeenv().

Re: svn commit: r273552 - head/sys/kern

2014-10-23 Thread Bryan Drewery
On 10/23/2014 6:21 PM, Mateusz Guzik wrote: On Thu, Oct 23, 2014 at 04:19:05PM -0700, Xin Li wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 10/23/14 15:47, Dag-Erling Smørgrav wrote: Xin LI delp...@freebsd.org writes: Log: Test if 'env' is NULL before doing memset() and strlen(),