dragino / dragino-packages

23 stars 27 forks source link

Lg02 security fixes #4

Closed joerg555 closed 4 years ago

joerg555 commented 4 years ago

Hi Dragino Team

you have an overflow in "lg02-pkt-fwd/src/simple_spi_rw.c" before "desc" is only 8 bytes strcpy(loradev->desc, "LG02 detect");

I used a new function and a macro with sizeof() to avoid this void jstrncpy(char *sDest, const char *sSrc, int iDestLength);

The rest is small stuff, please check it.

I have an Dragino LG01N Gateway Question: Are you intrested to optimize polling of DIO0 Pin with linux GPIO function ? I can make a sample and a pull request for you