Bug 202507

Summary: usr/src/tests/sys/aio/lio_kqueue_test.c:82: buffer too small ?
Product: Base System Reporter: David Binderman <dcb314>
Component: miscAssignee: freebsd-bugs mailing list <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: avos
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description David Binderman 2015-08-20 06:31:33 UTC
[usr/src/tests/sys/aio/lio_kqueue_test.c:82]: (error) Buffer is accessed out of bounds: pathname

Source code is

        strcpy(pathname, PATH_TEMPLATE);

but

    char *file, pathname[sizeof(PATH_TEMPLATE)-1];

Maybe better code

    char *file, pathname[sizeof(PATH_TEMPLATE) + 1];
Comment 1 Andriy Voskoboinyk freebsd_committer 2019-02-07 14:26:41 UTC
Fixed in base r292819.