summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-12-03 16:08:00 +0000
committerphk <phk@FreeBSD.org>1996-12-03 16:08:00 +0000
commit608c221651aad09247a127375aaafa10e99703e0 (patch)
tree69d79e6f60b794740399bd723445237f3be92037 /sys/dev/ed
parent76aeb5ebeb785643931ab86ffe9b327909fd4886 (diff)
downloadFreeBSD-src-608c221651aad09247a127375aaafa10e99703e0.zip
FreeBSD-src-608c221651aad09247a127375aaafa10e99703e0.tar.gz
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>
Diffstat (limited to 'sys/dev/ed')
-rw-r--r--sys/dev/ed/if_ed.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 6e2d5e8..96da68c 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -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);
OpenPOWER on IntegriCloud