node-strtok
node-strtok copied to clipboard
Invalid BufferType validation
I encountered a library using strtok2 that is unfortunately constructing a BufferType, passing in NaN for the length. Unfortunately, this is causing the parser to get into a state from whence there is no return. By throwing an exception, this should notify those that are calling BufferType incorrectly that an error has occurred so that at the very least, an uncaught exception will occur.