Ticket #117 (closed defect: fixed)
CFLAGS arrays not big enough
| Reported by: | Nathan Weeks <weeks@…> | Owned by: | aduran |
|---|---|---|---|
| Priority: | trivial | Milestone: | version 1.2 |
| Component: | common | Version: | version 1.1 |
| Keywords: | Cc: | ||
| Application Version: | all | Blocked By: | |
| Blocking: | Sensitive: | no | |
| Needs experiment: | no | ||
| Experimental observations: |
I observed output corruption when using a customized |
||
Description
These arrays that store the CFLAGS are a bit small:
$ grep -Fn 'cflags[' common/*.c common/bots_common.c:135: char str_cflags[128]; common/bots_main.c:72:char bots_cflags[128];
This can cause output corruption if the value of CFLAGS is longer
than this.
Suggest making the arrays bigger and/or using strncpy() &
snprintf() instead of strcpy() and sprintf() when using these arrays.
Change History
Note: See
TracTickets for help on using
tickets.
