summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-05-24 14:25:21 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-05-24 14:25:21 +0000
commit49384741ccb14f3d28d08ccd3395dfcabeee2828 (patch)
tree5fdf8b7c33c7b8f82d2984b32677ec70e4b5b7d1 /sys
parent426525999b166c10113c0b8e182a9c29722b3943 (diff)
We sometimes compile kernels with -Wvariable-decl because it makes us
happier regarding potential kernel stack overflows, so just use the (small) maximum buffer size in one case. ok marco
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ipmi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ipmi.c b/sys/dev/ipmi.c
index b9397cc591d..dd4c8c177ae 100644
--- a/sys/dev/ipmi.c
+++ b/sys/dev/ipmi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipmi.c,v 1.64 2008/06/11 23:22:07 cnst Exp $ */
+/* $OpenBSD: ipmi.c,v 1.65 2010/05/24 14:25:20 deraadt Exp $ */
/*
* Copyright (c) 2005 Jordan Hargrave
@@ -1090,7 +1090,7 @@ int
get_sdr_partial(struct ipmi_softc *sc, u_int16_t recordId, u_int16_t reserveId,
u_int8_t offset, u_int8_t length, void *buffer, u_int16_t *nxtRecordId)
{
- u_int8_t cmd[8 + length];
+ u_int8_t cmd[8 + 255]; /* 8 + max of length */
int len;
((u_int16_t *) cmd)[0] = reserveId;