mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
Overrun in drivers/char/rio/riocmd.c
This got somehow lost in the noise. This fixes coverity bug id #1025, if Rup is greater or equal to MAX_RUP, we run past the Mapping Array. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Cc: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a12bb44471
commit
84ea77635b
1 changed files with 1 additions and 1 deletions
|
@ -402,7 +402,7 @@ static int RIOCommandRup(struct rio_info *p, uint Rup, struct Host *HostP, struc
|
|||
rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: Host number %Zd, name ``%s''\n", HostP - p->RIOHosts, HostP->Name);
|
||||
rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: Rup number 0x%x\n", rup);
|
||||
|
||||
if (Rup >= (unsigned short) MAX_RUP) {
|
||||
if (Rup < (unsigned short) MAX_RUP) {
|
||||
rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: This is the RUP for RTA ``%s''\n", HostP->Mapping[Rup].Name);
|
||||
} else
|
||||
rio_dprintk(RIO_DEBUG_CMD, "CONTROL information: This is the RUP for link ``%c'' of host ``%s''\n", ('A' + Rup - MAX_RUP), HostP->Name);
|
||||
|
|
Loading…
Reference in a new issue