diff options
author | dec05eba <dec05eba@protonmail.com> | 2020-09-27 09:46:29 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-09-27 09:46:29 +0200 |
commit | b07cca0bb59300fe193015f1a8361448af72d05b (patch) | |
tree | e89f0b12e84a2a1cfa2faed918e7aea83f37e95d /src/VideoPlayer.cpp | |
parent | 4f89aee77ede589002ab75490fa1ab2a3ca3fe84 (diff) |
Validate json type after parsing
Diffstat (limited to 'src/VideoPlayer.cpp')
-rw-r--r-- | src/VideoPlayer.cpp | 2 |
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()) { |