From 230e98433d768d3973ea24a3dd260e96b0ebd1fa Mon Sep 17 00:00:00 2001 From: yeongtaik byeon Date: Thu, 18 Oct 2018 13:57:18 +0900 Subject: [PATCH 1/5] Update cwe.js --- cwe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index 29299c8..319efae 100644 --- a/cwe.js +++ b/cwe.js @@ -9,7 +9,7 @@ } function CWE_476() { // NULL_POINTER - var obj; + var obj = {}; var y = obj.x; console.log(y); } From a61b75fef56691b22c6607e3a84744f4140a9588 Mon Sep 17 00:00:00 2001 From: yeongtaik byeon Date: Thu, 18 Oct 2018 13:59:39 +0900 Subject: [PATCH 2/5] Update cwe.js --- cwe.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index 319efae..75782a3 100644 --- a/cwe.js +++ b/cwe.js @@ -10,8 +10,10 @@ function CWE_476() { // NULL_POINTER var obj = {}; + var obj2; var y = obj.x; - console.log(y); + var z = obj.y; + console.log(y, z); } function CWE_480() { // BAD_BITWISE_OPERATOR From e6866ad926645eb6c4376c1939fd05321b250fb8 Mon Sep 17 00:00:00 2001 From: yeongtaik byeon Date: Thu, 18 Oct 2018 14:04:26 +0900 Subject: [PATCH 3/5] Update cwe.js --- cwe.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index 75782a3..0f74b56 100644 --- a/cwe.js +++ b/cwe.js @@ -11,9 +11,11 @@ function CWE_476() { // NULL_POINTER var obj = {}; var obj2; + var obj3; var y = obj.x; var z = obj.y; - console.log(y, z); + var x = obj.z; + console.log(y, z, x); } function CWE_480() { // BAD_BITWISE_OPERATOR From 79e08b8cd55f7dea253fb2da6dfbaa8d0c4b0b76 Mon Sep 17 00:00:00 2001 From: yeongtaik byeon Date: Thu, 18 Oct 2018 14:08:47 +0900 Subject: [PATCH 4/5] Update cwe.js --- cwe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index 0f74b56..3ee4e30 100644 --- a/cwe.js +++ b/cwe.js @@ -13,7 +13,7 @@ var obj2; var obj3; var y = obj.x; - var z = obj.y; + var z = obj2.y; var x = obj.z; console.log(y, z, x); } From fb314e5dabe4bc73aaee7c21a775d439d112f894 Mon Sep 17 00:00:00 2001 From: yeongtaik byeon Date: Fri, 22 Mar 2019 12:25:01 +0900 Subject: [PATCH 5/5] Update cwe.js --- cwe.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cwe.js b/cwe.js index 3ee4e30..24b9b79 100644 --- a/cwe.js +++ b/cwe.js @@ -19,8 +19,15 @@ } function CWE_480() { // BAD_BITWISE_OPERATOR - var obj = null; - if (obj & obj.prop) { + var obj; + if (obj.prop) { + console.log(obj.prop); + } + } + +function CWE_480() { // BAD_BITWISE_OPERATOR + var obj; + if (obj.prop) { console.log(obj.prop); } }