-
Notifications
You must be signed in to change notification settings - Fork 27
Closed
Description
Checklist (Please check before submitting)
- I reviewed the Contributing Guide.
- I performed a cursory search to see if the bug report is relevant, not redundant, nor in conflict with other tickets.
Describe the bug
The unit test code sets the EventText member with a call to strncpy and a hardcoded size here:
LC/unit-test/lc_action_tests.c
Line 233 in 779b903
| strncpy(LC_OperData.ADTPtr[APNumber].EventText, "Event Message", 50); |
However in the default platform config the size is only 32:
Line 228 in 779b903
| #define LC_MAX_ACTION_TEXT 32 |
To Reproduce
Build and run using default/out-of-box config.
Expected behavior
Example configuration should not trigger buffer overflow
Additional context
Consider using sizeof() operator here, to adapt the strncpy call to the real size of the target buffer.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.