]> xenbits.xen.org Git - xenclient/ioemu.git/commit
passthrough: fix buffer overflow of vslots
authorIan Jackson <ian.jackson@eu.citrix.com>
Wed, 25 Mar 2009 11:38:29 +0000 (11:38 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Wed, 25 Mar 2009 11:38:29 +0000 (11:38 +0000)
commit485fc28751b0b14fa6c02130c014e97f2c71279c
tree8ce8519e74a8707c6ac0c1362d6a19e550b8db49
parent6dee1ba50e3b9d7516d0d022244033849a94c893
passthrough: fix buffer overflow of vslots

Assuming we assign n devices, strlen(direct_pci) can be 13n and the
length of the old 'vslots' is 13n/3 which is smaller than 5n+1 (1
slot_str takes 5 bytes).  So we have to malloc a bigger buffer for
vslots.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
hw/pass-through.c