Skip to content

Commit 1da780f

Browse files
committed
Fixed buffer overflow. Closes #19.
That was a silly mistake.
1 parent e935825 commit 1da780f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/robotjs.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ NAN_METHOD(getPixelColor)
449449

450450
color = MMRGBHexAtPoint(bitmap, 0, 0);
451451

452-
char hex [6];
452+
char hex [7];
453453

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

0 commit comments

Comments
 (0)