Skip to content

Commit

Permalink
Fixed buffer overflow. Closes #19.
Browse files Browse the repository at this point in the history
That was a silly mistake.
  • Loading branch information
octalmage committed Jul 18, 2015
1 parent e935825 commit 1da780f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/robotjs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ NAN_METHOD(getPixelColor)

color = MMRGBHexAtPoint(bitmap, 0, 0);

char hex [6];
char hex [7];

//Length needs to be 7 because snprintf includes a terminating null.
//Use %06x to pad hex value with leading 0s.
Expand Down

0 comments on commit 1da780f

Please sign in to comment.