Skip to content

Commit 92d1c84

Browse files
committed
bind the result in JsonValue::getBooleanValue
1 parent 7123735 commit 92d1c84

File tree

1 file changed

+3
-1
lines changed
  • javascript/ql/lib/semmle/javascript

1 file changed

+3
-1
lines changed

javascript/ql/lib/semmle/javascript/JSON.qll

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ class JsonValue extends @json_value, Locatable {
5454
int getIntValue() { result = this.(JsonNumber).getValue().toInt() }
5555

5656
/** If this is a boolean constant, gets its boolean value. */
57-
boolean getBooleanValue() { result.toString() = this.(JsonBoolean).getValue() }
57+
boolean getBooleanValue() {
58+
result.toString() = this.(JsonBoolean).getValue() and result = [true, false]
59+
}
5860

5961
override string getAPrimaryQlClass() { result = "JsonValue" }
6062
}

0 commit comments

Comments
 (0)