diff --git a/sys/dev/ofisa/ess_ofisa.c b/sys/dev/ofisa/ess_ofisa.c index 96bdbc9df62c..6ca117d42341 100644 --- a/sys/dev/ofisa/ess_ofisa.c +++ b/sys/dev/ofisa/ess_ofisa.c @@ -1,4 +1,4 @@ -/* $NetBSD: ess_ofisa.c,v 1.25 2010/05/22 16:35:00 tsutsui Exp $ */ +/* $NetBSD: ess_ofisa.c,v 1.26 2016/12/09 16:22:09 christos Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.25 2010/05/22 16:35:00 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ess_ofisa.c,v 1.26 2016/12/09 16:22:09 christos Exp $"); #include #include @@ -86,7 +86,6 @@ ess_ofisa_attach(device_t parent, device_t self, void *aux) struct ofisa_intr_desc intr[2]; struct ofisa_dma_desc dma[2]; int n, ndrq; - char *model; sc->sc_dev = self; @@ -164,7 +163,9 @@ ess_ofisa_attach(device_t parent, device_t self, void *aux) n = OF_getproplen(aa->oba.oba_phandle, "model"); if (n > 0) { - model = alloca(n); + char model[256]; + if (n > 256) + n = 256; if (OF_getprop(aa->oba.oba_phandle, "model", model, n) == n) { aprint_normal(": %s\n", model); aprint_normal_dev(self, "");