node-modbus-serial icon indicating copy to clipboard operation
node-modbus-serial copied to clipboard

Improper Null Termination on nan.h

Open ponguruswamy opened this issue 3 years ago • 0 comments

The buffer errmsg_ in node_modules/nan/nan.h at line 2007 does not have a null terminator. Any subsequent operations on this buffer that treat it as a null-terminated string will result in unexpected or dangerous behavior.

void SetErrorMessage(const char *msg) { .... 2012. memcpy(errmsg_, msg, size);

ponguruswamy avatar Dec 16 '21 11:12 ponguruswamy