amaiorano / hsm

C++ framework library to simplify state-driven code
MIT License
107 stars 38 forks source link

fix potential buffer overflow in StateMachine::Log #4

Closed amaiorano closed 7 years ago

amaiorano commented 7 years ago

VSNPRINTF(buffer + offset, sizeof(buffer), format, args);

should be:

VSNPRINTF(buffer + offset, sizeof(buffer) - offset - 1, format, args);

amaiorano commented 7 years ago

Bug was not present.