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> |
||
---|---|---|
.. | ||
.gitignore | ||
Makefile | ||
vbdev_lvol_ut.c |