[Commits] : Tuxbox-GIT: apps branch master updated. CVS-Final-528-gc9e59d0
Tuxbox Sources
Brought to you by:
dbt1
From: GetAway <tux...@ne...> - 2015-04-15 19:21:12
|
Project "Tuxbox-GIT: apps": The branch, master has been updated via c9e59d02633e16dfe7fe08aefe99e678d89102fd (commit) from 7a711c6512f23b9dfed7138b54642e3c6add2b5e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c9e59d02633e16dfe7fe08aefe99e678d89102fd Author: Jacek Jendrzej <cra...@go...> Date: Wed Apr 15 21:18:48 2015 +0200 nhttpd: change sprintf to snprintf Signed-off-by: GetAway <get...@t-...> diff --git a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp index 2205a53..020633e 100644 --- a/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/tuxboxapi/controlapi.cpp @@ -1994,7 +1994,7 @@ void CControlAPI::SendTimers(CyhookHandler *hh) strcpy(zAddData, NeutrinoAPI->Zapit->isChannelTVChannel(timer->channel_id) ? "Unbekannter TV-Kanal" : "Unbekannter Radiokanal"); } else - sprintf(zAddData, PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer->channel_id); + snprintf(zAddData,sizeof(zAddData), PRINTF_CHANNEL_ID_TYPE_NO_LEADING_ZEROS, timer->channel_id); zAddData[22]=0; @@ -2002,7 +2002,7 @@ void CControlAPI::SendTimers(CyhookHandler *hh) case CTimerd::TIMER_STANDBY: if (!send_id) - sprintf(zAddData,"Standby: %s",(timer->standby_on ? "ON" : "OFF")); + snprintf(zAddData,sizeof(zAddData),"Standby: %s",(timer->standby_on ? "ON" : "OFF")); break; case CTimerd::TIMER_REMIND : diff --git a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp index 471eb23..e84274b 100644 --- a/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp +++ b/tuxbox/neutrino/daemons/nhttpd/yhttpd_core/helper.cpp @@ -253,7 +253,7 @@ std::string encodeString(std::string decodedString) if(isalnum(one_char)) *newString++ = one_char; else - newString += sprintf(newString, "&#%d;", (unsigned char) one_char); + newString += snprintf(newString, result.length(), "&#%d;", (unsigned char) one_char); } *newString='\0'; /* when done copying the string,need to terminate w/ null char */ ----------------------------------------------------------------------- Summary of changes: .../daemons/nhttpd/tuxboxapi/controlapi.cpp | 4 ++-- .../neutrino/daemons/nhttpd/yhttpd_core/helper.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- Tuxbox-GIT: apps |