diff --git a/src/gui/widget/stringinput.cpp b/src/gui/widget/stringinput.cpp index 06c3a854d..feb9baefe 100644 --- a/src/gui/widget/stringinput.cpp +++ b/src/gui/widget/stringinput.cpp @@ -226,7 +226,7 @@ void CStringInput::NormalKeyPressed(const neutrino_msg_t key) else paintChar(selected); }else{ - snprintf(value, sizeof(value),"%s",tmp_value.c_str()); + snprintf(value, size + 1, "%s", tmp_value.c_str()); } } } @@ -322,7 +322,7 @@ void CStringInput::keyUpPressed() else paintChar(selected); }else{ - snprintf(value, sizeof(value),"%s",tmp_value.c_str()); + snprintf(value, size + 1, "%s", tmp_value.c_str()); } } @@ -358,7 +358,7 @@ void CStringInput::keyDownPressed() else paintChar(selected); }else{ - snprintf(value, sizeof(value),"%s",tmp_value.c_str()); + snprintf(value, size + 1, "%s", tmp_value.c_str()); } } diff --git a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp index 65b433331..9c9d6d9bb 100644 --- a/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/neutrinoapi.cpp @@ -226,7 +226,7 @@ bool CNeutrinoAPI::GetStreamInfo(int bitInfo[10]) long value; int pos = 0; - memset(bitInfo, 0, sizeof(bitInfo)); + memset(bitInfo, 0, sizeof(int[10])); FILE *fd = fopen("/proc/bus/bitstream", "rt");