From a0624eb8581e704a00e0000bad83f6083a2c7f5a Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 14:41:51 +0900 Subject: [PATCH 1/7] Update cwe.js --- cwe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index bb09a12..2aea8b5 100644 --- a/cwe.js +++ b/cwe.js @@ -60,7 +60,7 @@ } function CWE_670(x) { // STRAY_SEMICOLON - while (++x <= 10) ; + while (++x <= 10) { sum += x; } From 2bb1b9147143a47461b84210b72ec3c250b52892 Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 14:58:36 +0900 Subject: [PATCH 2/7] Update cwe.js --- cwe.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cwe.js b/cwe.js index 2aea8b5..7ee04ec 100644 --- a/cwe.js +++ b/cwe.js @@ -65,3 +65,9 @@ sum += x; } } + + +function CWE_685() { // MISMATCHED_COUNT_OF_ARGS + return Math.atan2(a/b); +} + From 59bf90110406245c1a0808d82e9d76f34a8dedc0 Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 15:02:36 +0900 Subject: [PATCH 3/7] Update cwe.js --- cwe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index 7ee04ec..eae3d19 100644 --- a/cwe.js +++ b/cwe.js @@ -60,7 +60,7 @@ } function CWE_670(x) { // STRAY_SEMICOLON - while (++x <= 10) + while (++x <= 10) ; { sum += x; } From 5a75e65fc374e04bd0e1fcdd495b42e696fd3da0 Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 15:03:58 +0900 Subject: [PATCH 4/7] Update cwe.js --- cwe.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cwe.js b/cwe.js index eae3d19..a716e23 100644 --- a/cwe.js +++ b/cwe.js @@ -71,3 +71,7 @@ function CWE_685() { // MISMATCHED_COUNT_OF_ARGS return Math.atan2(a/b); } +function test1216() { + const a = 1; + a = 3; +} From fe09643afbaf6bb01a8a99e8cd3e9e2054219943 Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 15:05:04 +0900 Subject: [PATCH 5/7] Update cwe.js --- cwe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cwe.js b/cwe.js index a716e23..917f533 100644 --- a/cwe.js +++ b/cwe.js @@ -73,5 +73,5 @@ function CWE_685() { // MISMATCHED_COUNT_OF_ARGS function test1216() { const a = 1; - a = 3; + a = b; } From ef3831135703a977cd6e6381bd367c0603b0aadb Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 15:17:02 +0900 Subject: [PATCH 6/7] Update cwe.js --- cwe.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cwe.js b/cwe.js index 917f533..284c843 100644 --- a/cwe.js +++ b/cwe.js @@ -74,4 +74,5 @@ function CWE_685() { // MISMATCHED_COUNT_OF_ARGS function test1216() { const a = 1; a = b; + let b = 3; } From 7b21dbdd2329a9e580bbe6ec7e4f1b671cc8ece7 Mon Sep 17 00:00:00 2001 From: sophy1 Date: Wed, 26 Dec 2018 15:20:03 +0900 Subject: [PATCH 7/7] Update cwe.js --- cwe.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cwe.js b/cwe.js index 284c843..a85916b 100644 --- a/cwe.js +++ b/cwe.js @@ -72,7 +72,6 @@ function CWE_685() { // MISMATCHED_COUNT_OF_ARGS } function test1216() { - const a = 1; - a = b; - let b = 3; + const a = b; + return a.b; }