From 1da780ff4990e96cfb6d53520e683f5fa130a7c4 Mon Sep 17 00:00:00 2001 From: Jason Stallings Date: Sat, 18 Jul 2015 11:58:43 -0500 Subject: [PATCH] Fixed buffer overflow. Closes #19. That was a silly mistake. --- src/robotjs.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robotjs.cc b/src/robotjs.cc index dcb367f6..c2d169a1 100644 --- a/src/robotjs.cc +++ b/src/robotjs.cc @@ -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.