This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Subject: [PATCH] Fix parser state bug causing field-value misalignment | |
--- | |
lib/mysql/parser.js | 2 +- | |
1 files changed, 1 insertions(+), 1 deletions(-) | |
diff --git a/lib/mysql/parser.js b/lib/mysql/parser.js | |
index 077a0e8..f397752 100644 | |
--- a/lib/mysql/parser.js | |
+++ b/lib/mysql/parser.js | |
@@ -515,7 +515,7 @@ Parser.prototype.write = function(buffer) { | |
break; | |
case Parser.COLUMN_VALUE_STRING: | |
var remaining = packet.columnLength - packet.index, read; | |
- if (i + remaining >= buffer.length) { | |
+ if (i + remaining > buffer.length) { | |
read = buffer.length - i; | |
packet.emit('data', buffer.slice(i, buffer.length), remaining - read); | |
packet.index += read; | |
-- | |
1.7.0.2.msysgit.0 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment