Skip to content

Commit

Permalink
Merge pull request #763 from skliper/fix761-ut_file_null
Browse files Browse the repository at this point in the history
Fix #761, Terminate string in TestReadWriteLseek
  • Loading branch information
astrogeco committed Jan 21, 2021
2 parents 33738d0 + 08693cc commit 0af2a55
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 0af2a55

Please sign in to comment.