tests: libs: Fix string overflow
This fixes a string overflow past the end of a buffer which was reported by coverity. Coverity-CID: 152044 Change-Id: I5b331135e338fa43b5589a9488b06367e8cad5a7 Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
This commit is contained in:
parent
b58b1bbc9c
commit
e8c7c0b400
1 changed files with 2 additions and 2 deletions
|
@ -271,9 +271,9 @@ int strcpy_test(void)
|
|||
TC_PRINT("\tstrcpy ...\t");
|
||||
|
||||
memset(buffer, '\0', BUFSIZE);
|
||||
strcpy(buffer, "10 chars!!\0");
|
||||
strcpy(buffer, "10 chars!\0");
|
||||
|
||||
if (strcmp(buffer, "10 chars!!\0") != 0) {
|
||||
if (strcmp(buffer, "10 chars!\0") != 0) {
|
||||
TC_PRINT("failed\n");
|
||||
return TC_FAIL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue