Skip to content

Replace unsafe sprintf() in NSWL1Simulation::initialize()

In NSWL1Simulation::initialize(), two calls are made to sprintf into a stack-allocated array. The format string is unbounded, meaning a name() longer than 36 characters (extremely unlikely) will result in a stack buffer overflow.

This replaces the sprintf and char arrays with C++ strings.

Merge request reports

Loading