Skip to content
Snippets Groups Projects
Commit c772389f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Prevent heap corruption by bounds-checking writes to opt[]

Since we are now free()ing the opt[] items in bail(), I've seen heap
corruption core dumps after navigating the SCFG menus with some long
configuration items (e.g. timed events with max-length command-lines).
This heap corruption has been present for a long, long time, but not
detected since we weren't free()ing these heap-allocated items.
Increasing MAX_OPLN would have been a mitigation for this issue, but
using snprintf(opt[n],MAX_OPLN,...) is the better fix.
parent 9c7ecc89
Branches
Tags
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4320 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment