Immediate-Mode-UI / Nuklear

A single-header ANSI C immediate mode cross-platform GUI library
https://immediate-mode-ui.github.io/Nuklear/doc/index.html
Other
9.17k stars 553 forks source link

Errors Reported By Facebook Infer #585

Open Asgard1232 opened 11 months ago

Asgard1232 commented 11 months ago

inferNuk.zip

Facebook Infer seems to have found potential errors in Nuklear, including 3 buffer overruns and some unsigned integer overflows and uninitialized values. Would the overflows cause unexpected behaviour? If so, perhaps an overflow blocking header (such as https://mega.nz/file/SxYgzYYQ#7mL1bPyyATYbSTdxi6F7co-QZ63wNtGh2TdP36Gya3g - although it would presumably need to be altered for compatibility with C89) can be used? As for the buffer overruns, could they affect memory safety? The Infer report, and the C files, command line text and makefile involved, are in the Zip file attached to this message (I used Nuklear+ with a small change that allows writing a single event loop for the program, instead of a callback, when running in Emscripten).