Skip to content

Commit

Permalink
Fix nasa#761, Terminate string in TestReadWriteLseek
Browse files Browse the repository at this point in the history
  • Loading branch information
skliper committed Jan 15, 2021
1 parent bfca5b2 commit 08693cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tests/file-api-test/file-api-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,8 @@ void TestReadWriteLseek(void)
status = OS_OpenCreate(&fd, filename, OS_FILE_FLAG_CREATE | OS_FILE_FLAG_TRUNCATE, OS_READ_WRITE);
UtAssert_True(status >= OS_SUCCESS, "status after creat = %d", (int)status);

size = strlen(buffer);
/* Write the string including null character */
size = strlen(buffer) + 1;

/* test write portion of R/W mode */
status = OS_write(fd, (void *)buffer, size);
Expand Down

0 comments on commit 08693cc

Please sign in to comment.