You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2019/12/18 17:58:42 UTC

[couchdb-escodegen] reference refs/pull/241/head created (now 7f041e0)

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a change to reference refs/pull/241/head
in repository https://gitbox.apache.org/repos/asf/couchdb-escodegen.git.


      at 7f041e0  fix unhandled undefined pattern literal RegExp pattern literal may be undefined, leading app crashes in generateRegExp()

This reference includes the following new commits:

     new 7f041e0  fix unhandled undefined pattern literal RegExp pattern literal may be undefined, leading app crashes in generateRegExp()

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[couchdb-escodegen] 01/01: fix unhandled undefined pattern literal RegExp pattern literal may be undefined, leading app crashes in generateRegExp()

Posted by da...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to reference refs/pull/241/head
in repository https://gitbox.apache.org/repos/asf/couchdb-escodegen.git

commit 7f041e07a76c1dcd8547f5bf63fd8f2d4abcacad
Author: ChiChou <zh...@knownsec.com>
AuthorDate: Wed Jul 22 22:27:41 2015 +0800

    fix unhandled undefined pattern literal
    RegExp pattern literal may be undefined, leading app crashes in generateRegExp()
---
 escodegen.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/escodegen.js b/escodegen.js
index f706c05..9d21ad7 100644
--- a/escodegen.js
+++ b/escodegen.js
@@ -2270,7 +2270,7 @@
                 }
             }
 
-            if (expr.value === null) {
+            if (typeof expr.value === 'undefined' || expr.value === null) {
                 return 'null';
             }