From 0d7818f01d4fbae4215dfaa746bcbe577c750bb8 Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Thu, 3 Mar 2016 20:49:58 +0100 Subject: [PATCH] src/nhttpd/tuxboxapi/controlapi.cpp fix 64bit AddressSanitizer: heap-buffer-overflow Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/9fc9b228ed9ab2b2cbe9ce7a3211814a5c72ad96 Author: Jacek Jendrzej Date: 2016-03-03 (Thu, 03 Mar 2016) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/nhttpd/tuxboxapi/controlapi.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/nhttpd/tuxboxapi/controlapi.cpp b/src/nhttpd/tuxboxapi/controlapi.cpp index 43d769619..68db0a057 100644 --- a/src/nhttpd/tuxboxapi/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/controlapi.cpp @@ -347,8 +347,8 @@ void CControlAPI::SetModeCGI(CyhookHandler *hh) if (hh->ParamList["1"] == "radio") // switch to radio mode { if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby){ - int mode = NeutrinoMessages::mode_radio; - NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(int)); + neutrino_msg_data_t mode = NeutrinoMessages::mode_radio; + NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(neutrino_msg_data_t)); sleep(1); NeutrinoAPI->UpdateBouquets(); }else{ @@ -359,8 +359,8 @@ void CControlAPI::SetModeCGI(CyhookHandler *hh) else if (hh->ParamList["1"] == "tv") // switch to tv mode { if(CNeutrinoApp::getInstance()->getMode() != NeutrinoMessages::mode_standby){ - int mode = NeutrinoMessages::mode_tv; - NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(int)); + neutrino_msg_data_t mode = NeutrinoMessages::mode_tv; + NeutrinoAPI->EventServer->sendEvent(NeutrinoMessages::CHANGEMODE, CEventServer::INITID_HTTPD, (void *)&mode,sizeof(neutrino_msg_data_t)); sleep(1); NeutrinoAPI->UpdateBouquets(); }else{