PR kern/2141:

function ed_attach_NE2000_pci() in if_ed.c passes
        an uninitialized block of memory (got with malloc())
        to ed_attach. This prevents a proper initialization
        of the device descriptor and in my case causes a panic
        during the probe, while printing out device info.

Reviewed by:	phk
Submitted by:	Luigi Rizzo <luigi@iet.unipi.it>
This commit is contained in:
Poul-Henning Kamp 1996-12-03 16:08:00 +00:00
parent 81afa0e644
commit 673f8923d0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=20116
2 changed files with 4 additions and 2 deletions

View File

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_ed.c,v 1.107 1996/10/17 13:42:13 nate Exp $
* $Id: if_ed.c,v 1.108 1996/11/15 16:07:03 wollman Exp $
*/
/*
@ -1782,6 +1782,7 @@ ed_attach_NE2000_pci(unit, port)
if (!sc)
return sc;
bzero(sc, sizeof *sc);
if (ed_probe_Novell_generic(sc, port, unit, isa_flags) == 0
|| ed_attach(sc, unit, isa_flags) == 0) {
free(sc, M_DEVBUF);

View File

@ -24,7 +24,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: if_ed.c,v 1.107 1996/10/17 13:42:13 nate Exp $
* $Id: if_ed.c,v 1.108 1996/11/15 16:07:03 wollman Exp $
*/
/*
@ -1782,6 +1782,7 @@ ed_attach_NE2000_pci(unit, port)
if (!sc)
return sc;
bzero(sc, sizeof *sc);
if (ed_probe_Novell_generic(sc, port, unit, isa_flags) == 0
|| ed_attach(sc, unit, isa_flags) == 0) {
free(sc, M_DEVBUF);