aboutsummaryrefslogtreecommitdiff
path: root/src/VideoPlayer.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-09-27 09:46:29 +0200
committerdec05eba <dec05eba@protonmail.com>2020-09-27 09:46:29 +0200
commitb07cca0bb59300fe193015f1a8361448af72d05b (patch)
treee89f0b12e84a2a1cfa2faed918e7aea83f37e95d /src/VideoPlayer.cpp
parent4f89aee77ede589002ab75490fa1ab2a3ca3fe84 (diff)
Validate json type after parsing
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r--src/VideoPlayer.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/VideoPlayer.cpp b/src/VideoPlayer.cpp
index 0ad4152..ac93ecc 100644
--- a/src/VideoPlayer.cpp
+++ b/src/VideoPlayer.cpp
@@ -254,7 +254,7 @@ namespace QuickMedia {
if(buffer[i] != '\n')
continue;
- if(json_reader->parse(buffer + start, buffer + i, &json_root, &json_errors)) {
+ if(json_reader->parse(buffer + start, buffer + i, &json_root, &json_errors) && json_root.isObject()) {
const Json::Value &event = json_root["event"];
const Json::Value &request_id_json = json_root["request_id"];
if(event.isString()) {