examples/nvme: replace sprintf with snprintf

Change-Id: I08c594e26df9e1cdae67596e92db646c92701f85
Signed-off-by: Ziye Yang <ziye.yang@intel.com>
This commit is contained in:
Ziye Yang 2017-03-24 10:59:48 +08:00 committed by Ben Walker
parent 01922c74d1
commit 21ce0f4030

View File

@ -181,7 +181,7 @@ hello_world(void)
* 0 on the namespace, and then later read it back into a separate buffer
* to demonstrate the full I/O path.
*/
sprintf(sequence.buf, "Hello world!\n");
snprintf(sequence.buf, 0x1000, "%s", "Hello world!\n");
/*
* Write the data buffer to LBA 0 of this namespace. "write_complete" and