Fix crash when a invalid device is received in rdpdr_process_irp.
Thanks goes to David Fries for the patch. git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1701 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
81641e5b4d
commit
5b1e084fe2
8
rdpdr.c
8
rdpdr.c
@ -379,6 +379,14 @@ rdpdr_process_irp(STREAM s)
|
||||
buffer = (uint8 *) xmalloc(1024);
|
||||
buffer[0] = 0;
|
||||
|
||||
if (device >= RDPDR_MAX_DEVICES)
|
||||
{
|
||||
error("invalid irp device 0x%lx file 0x%lx id 0x%lx major 0x%lx minor 0x%lx\n",
|
||||
device, file, id, major, minor);
|
||||
xfree(buffer);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (g_rdpdr_device[device].device_type)
|
||||
{
|
||||
case DEVICE_TYPE_SERIAL:
|
||||
|
Loading…
Reference in New Issue
Block a user