Spdk/test/unit/lib/bdev
Daniel Verkamp 08eeefc718 ut/lvol: remove use of sprintf()
sprintf() has no bounds checks, and in this case it is actually
overwriting a buffer allocated with spdk_sprintf_alloc(), which isn't
guaranteed to be big enough for the name we want to place in it.

Rather than trying to rewrite the name in place, just free the old one
and allocate a new one.

Change-Id: Ia6ea17c2f0c8e4ed4995946356b8a09ba2a02cbf
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/382507
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2017-10-16 15:52:14 -04:00
..
bdev.c bdev: use spdk_vbdev_unregister when unregistering partitions 2017-10-01 21:57:00 -04:00
gpt test/bdev/gpt: link spdk_util for CRC32 function 2017-08-15 15:24:29 -04:00
mt bdev: add ENOMEM handling 2017-10-01 21:57:00 -04:00
scsi_nvme.c test: move SCSI/NVMe translation test to test/unit 2017-06-20 13:46:07 -04:00
vbdev_lvol.c ut/lvol: remove use of sprintf() 2017-10-16 15:52:14 -04:00
Makefile test/bdev: add simulated multi-thread unit tests 2017-09-22 15:38:44 -04:00