summaryrefslogtreecommitdiff
path: root/src/3rd_party-static
diff options
context:
space:
mode:
authorJustin Dickow <jjdickow@gmail.com>2015-01-24 16:58:15 -0500
committerJustin Dickow <jjdickow@gmail.com>2015-01-24 16:58:15 -0500
commita24079cb8de5563376dcf782cdb9fe3cae063841 (patch)
tree1fca30dde1aa30c7ac11fb6b009d2bd6420bd648 /src/3rd_party-static
parentf948dd4539eeecb2c32084cc39b68923fc94e3dd (diff)
downloadsdl_core-a24079cb8de5563376dcf782cdb9fe3cae063841.tar.gz
HmiStatus modify
HU DCHECK occurs during multisession registration Remove unused variable SIGSEGV handler added to flush logger queue FixIncomplete device list in UpdateDeviceList request Fix Memory leak on PutFile break Fix Thread and Timer Fix OnHmiStatus Notification Fix Url array sending for endpoints. Fix HashChange Fix SDL parse incoming JSON message with both members error and result as success message Fix Core crashes while connecting mobile app Signed-off-by: Justin Dickow <jjdickow@gmail.com>
Diffstat (limited to 'src/3rd_party-static')
-rw-r--r--src/3rd_party-static/MessageBroker/CMakeLists.txt2
-rw-r--r--src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp6
-rw-r--r--src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp5
-rw-r--r--src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp2
4 files changed, 12 insertions, 3 deletions
diff --git a/src/3rd_party-static/MessageBroker/CMakeLists.txt b/src/3rd_party-static/MessageBroker/CMakeLists.txt
index f2095ae36e..87a0fe2a2a 100644
--- a/src/3rd_party-static/MessageBroker/CMakeLists.txt
+++ b/src/3rd_party-static/MessageBroker/CMakeLists.txt
@@ -29,6 +29,8 @@ set (MESSAGE_BROKER_SERVER_SOURCES
)
add_library("MessageBroker" ${MESSAGE_BROKER_SOURCES})
+target_link_libraries(MessageBroker Utils)
+
add_library("MessageBrokerClient" ${MESSAGE_BROKER_CLIENT_SOURCES})
target_link_libraries("MessageBrokerClient" "MessageBroker")
diff --git a/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp b/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp
index bd8b0e3ed8..c37a62dbb8 100644
--- a/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp
+++ b/src/3rd_party-static/MessageBroker/src/client/mb_controller.cpp
@@ -311,6 +311,12 @@ namespace NsMessageBroker
return false;
}
+ if (root.isMember("result") && root.isMember("error"))
+ {
+ /* message can't contain simultaneously result and error*/
+ return false;
+ }
+
if (root.isMember("method"))
{
if (!root["method"].isString())
diff --git a/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp b/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
index 7713899b8c..b9c97f7ff9 100644
--- a/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
+++ b/src/3rd_party-static/MessageBroker/src/lib_messagebroker/websocket_handler.cpp
@@ -229,8 +229,9 @@ namespace NsMessageBroker
unsigned char hash[20] = {0xb3, 0x7a, 0x4f, 0x2c, 0xc0, 0x62, 0x4f, 0x16, 0x90, 0xf6, 0x46, 0x06, 0xcf, 0x38, 0x59, 0x45, 0xb2, 0xbe, 0xc4, 0xea};
int accept_len;
- strcpy(accept_buf, key.c_str());
- strcpy(accept_buf + key.length(), websocket_magic_guid_04);
+ strncpy(accept_buf, key.c_str(), MAX_WEBSOCKET_04_KEY_LEN + 37);
+ strncpy(accept_buf + key.length(), websocket_magic_guid_04,
+ MAX_WEBSOCKET_04_KEY_LEN + 37 - strlen(key.c_str()));
SHA1((unsigned char *)accept_buf, key.length() + strlen(websocket_magic_guid_04), hash);
diff --git a/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp b/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp
index 9bc6f23275..d0abe34811 100644
--- a/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp
+++ b/src/3rd_party-static/jsoncpp/src/lib_json/json_reader.cpp
@@ -576,7 +576,7 @@ Reader::decodeNumber( Token &token )
: Value::maxLargestUInt;
Value::LargestUInt threshold = maxIntegerValue / 10;
Value::UInt lastDigitThreshold = Value::UInt( maxIntegerValue % 10 );
- assert( lastDigitThreshold >=0 && lastDigitThreshold <= 9 );
+ assert(lastDigitThreshold <= 9 );
Value::LargestUInt value = 0;
while ( current < token.end_ )
{