Bug 202507 - usr/src/tests/sys/aio/lio_kqueue_test.c:82: buffer too small ?
Summary: usr/src/tests/sys/aio/lio_kqueue_test.c:82: buffer too small ?
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-20 06:31 UTC by David Binderman
Modified: 2019-02-07 14:26 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.