error while parsing: "should not reach here"
See original GitHub issue~Snip stack:
at Packet.readLengthCodedNumberExt (/node_modules/mysql2/lib/packets/packet.js:207:11)
at Packet.readLengthCodedNumber (/node_modules/mysql2/lib/packets/packet.js:157:15)
at Packet.parseLengthCodedInt (/node_modules/mysql2/lib/packets/packet.js:668:29)
I can’t tell exactly what the problem is, but it seems like there’s no bounds check on the Packet.readLengthCodedNumber
function.
if offset
is greater than buffer
’s length, then byte2
is set to undefined, which breaks the rest of the code.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Reached end of file while parsing - Net-Informations.Com
The error Reached End of File While Parsing is a compiler error and almost always means that your curly parenthesis are not ending...
Read more >Error while parsing — oracle-tech
Hi All When ever I execute the following programe I get an error public static final String CONFIG_FILE_NAME = "xyz.xml";
Read more >Why do I get an error while parsing custom code ... - MathWorks
I am trying to run a simulink model in which some C caller blocks are used ( external custom c code). The Model...
Read more >What is the "reached end of file while parsing" error, and how ...
You could avoid this error by fixing the syntax in the code causing the parser to expect additional closing syntax indicators (like a...
Read more >CS 111: Common Java Errors - CS-People by full name
Since Foo does not match with Bar, the code will not compile. ... expected File: Test.java [line: 9] Error: Test.java:9: reached end of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
upon inspection - it seems like it occurs if you call one of the conversion functions (
string
/buffer
/geometry
) more than once for a field.If you call one a second time then it essentially triggers the buffer read again without resetting the offset, which screws up the offset for future fields.
There should be handling in place this to prevent it (or an error message).
use mysql 5.7