Bug in SODAQ ONE Tracker v2 code


I don’t know if this is the right place to drop bug reports, but I did not see any other location.

I had strange crashes while using this code. However, I noticed a strange thing in the

bool convertAndCheckHexArray(uint8_t* result, const char* hex, size_t resultSize)

Namely it does this at the end:

result[outputIndex] = 0; // terminate the string

This is outside of the memory of the supplied byte array! And of course, since it is binary, there is no need to terminate.


Hi @plinnie, I think you could open a pull request here: https://github.com/SodaqMoja/SodaqOne-UniversalTracker/blob/master/SodaqOneTracker/SodaqOneTracker.ino

or in https://github.com/SodaqMoja/SodaqOne-UniversalTracker-v2 if you are using the V2 board.
Can we add a ONE_V2 category on this forum?

I created pull requests for both