+ Fix svace detected issue of checking range of enum value
[Version] 0.1.26
[Profile] Common
[Issue Type] Security
Change-Id: If9781777feb3d63a681a17ca6dc7eb31b9864a67
Name: capi-media-wav-player
Summary: A wav player library in Tizen C API
Name: capi-media-wav-player
Summary: A wav player library in Tizen C API
Release: 0
Group: Multimedia/API
License: Apache-2.0
Release: 0
Group: Multimedia/API
License: Apache-2.0
if (path == NULL)
return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
if (path == NULL)
return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
- if (type < SOUND_TYPE_SYSTEM || type >= SOUND_TYPE_NUM)
+ if (type >= SOUND_TYPE_NUM)
return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
m_path[0] = '\0';
if (path[0] != '/') {
if (getcwd(m_path, PATH_MAX) != NULL)
return _convert_wav_player_error_code(__func__, WAV_PLAYER_ERROR_INVALID_PARAMETER);
m_path[0] = '\0';
if (path[0] != '/') {
if (getcwd(m_path, PATH_MAX) != NULL)
- strncat(m_path, "/", PATH_MAX-strlen(m_path));
+ strncat(m_path, "/", PATH_MAX - strlen(m_path) - 1);
- strncat(m_path, path, PATH_MAX-strlen(m_path));
+ strncat(m_path, path, PATH_MAX - strlen(m_path) - 1);
if (cb) {
_completed_cb = _internal_complete_cb;
if (cb) {
_completed_cb = _internal_complete_cb;
if (path[0] != '/') {
if (getcwd(m_path, PATH_MAX) != NULL)
if (path[0] != '/') {
if (getcwd(m_path, PATH_MAX) != NULL)
- strncat(m_path, "/", PATH_MAX-strlen(m_path));
+ strncat(m_path, "/", PATH_MAX - strlen(m_path) - 1);
- strncat(m_path, path, PATH_MAX-strlen(m_path));
+ strncat(m_path, path, PATH_MAX - strlen(m_path) - 1);
if (callback) {
_completed_cb = _internal_complete_cb;
if (callback) {
_completed_cb = _internal_complete_cb;