Using ImPlot v0.17 on Windows 10
When SetupAxisTicks with the parameter n_ticks = k and k entries into the parameters labels, all the labels will be iterated over and passed into strlen.
However when SetupAxisTicks is called with and the parameter n_ticks = 1 and only single entry in the parameter labels is provided the function will set n_ticks to 2 but not make any corrections or checks on the amount of label entries causing an undefined region of the memory to be passed into strlen when labels are iterated over.
I do realize that this is an edge case and it might not be possible to make a neat fix since the functions deals with raw pointers but seeing action is taken to make sure a valid n_ticks is passed some I would expect some checking on the labels pointer as well.
Best
Using ImPlot v0.17 on Windows 10
When SetupAxisTicks with the parameter n_ticks = k and k entries into the parameters labels, all the labels will be iterated over and passed into strlen.
However when SetupAxisTicks is called with and the parameter n_ticks = 1 and only single entry in the parameter labels is provided the function will set n_ticks to 2 but not make any corrections or checks on the amount of label entries causing an undefined region of the memory to be passed into strlen when labels are iterated over.
I do realize that this is an edge case and it might not be possible to make a neat fix since the functions deals with raw pointers but seeing action is taken to make sure a valid n_ticks is passed some I would expect some checking on the labels pointer as well.
Best