Skip to content

TestReadWriteLseek has off by one error #761

@jhnphm

Description

@jhnphm

Describe the bug
TestReadWriteLseek calls strlen but fails to account for null terminator, causing garbage characters to be written to test log

To Reproduce
Build and run file-api-test
Depending on the contents of memory, bogus characters may be written to build/[arch]/default_[cpu]/Testing/Temporary/LastTest.log

Expected behavior
Valid characters in LastTest.log

Code snips
Should be size = strlen(buffer)+1

size = strlen(buffer);

System observed on:
Linux

Reporter Info
John N Pham, Northrop Grumman

Metadata

Metadata

Assignees

Labels

bugcommunityunit-testTickets related to the OSAL unit testing (functional and/or coverage)

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions