Ticket #117 (closed defect: fixed)

Opened 13 months ago

Last modified 13 months ago

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
CC_CFLAGS of length 392 in make.config.

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

Changed 13 months ago by aduran

  • owner set to aduran
  • status changed from new to accepted

Changed 13 months ago by ALEX DURAN <aduran@…>

  • status changed from accepted to closed
  • resolution set to fixed

(In [f0f8b5cb4bc7f9bc52aeb1ab2b82d6518076c0e3]) Sanitize environment variables input (fixes #117)

Note: See TracTickets for help on using tickets.