Menu

#336 passing NULL to _escapeString in Node.js crashes

open
nobody
None
5
2012-11-08
2012-11-08
Jira Trac
No

CUBRID Node.js driver has this code:

{code}
...
val = val.replace(/[\0\n\r\b\t\\'\x1a]/g, function (s) {
...
{code}

Obviously it will fail if *val* is NULL. Therefore, this function should also check if NULL is passed. If NULL, then return NULL unchanged.

Discussion

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.