Merge pull request #997 from zeha/fix_sigsegv_in_printer_parser

Fix out of bounds memory access with /printer:foo
This commit is contained in:
Marc-André Moreau 2013-02-24 11:28:21 -08:00
commit f9bf76d69d

View File

@ -290,7 +290,7 @@ int freerdp_client_add_device_channel(rdpSettings* settings, int count, char** p
printer->Type = RDPDR_DTYP_PRINT;
printer->Name = _strdup(params[1]);
if (params[2])
if (count > 2)
printer->DriverName = _strdup(params[2]);
freerdp_device_collection_add(settings, (RDPDR_DEVICE*) printer);