From: Seungbae Shin Date: Fri, 4 Aug 2023 11:55:33 +0000 (+0900) Subject: Fix SVACE defect (SIGN_EXTENSION) X-Git-Tag: accepted/tizen/unified/20230808.170217^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Faccepted%2Ftizen_8.0_unified;p=platform%2Fhal%2Fapi%2Faudio.git Fix SVACE defect (SIGN_EXTENSION) Unsafe conversion of expression with type 'unsigned int' to implementation defined type 'std::streamsize' may or may not override sign-bit depending on size of implementation defined type, which may cause unexpected results on porting to different platforms [Version] 0.0.17 [Issue Type] SVACE Change-Id: Ie537de2c380418c2713983837f749b4540bd6384 --- diff --git a/packaging/hal-api-audio.spec b/packaging/hal-api-audio.spec index 1d7c8ec..78465f9 100644 --- a/packaging/hal-api-audio.spec +++ b/packaging/hal-api-audio.spec @@ -1,6 +1,6 @@ Name: hal-api-audio Summary: TIZEN Audio HAL -Version: 0.0.16 +Version: 0.0.17 Release: 0 Group: System/Libraries License: Apache-2.0 diff --git a/testcase/audio_haltests.cpp b/testcase/audio_haltests.cpp index 6865410..80b10c2 100644 --- a/testcase/audio_haltests.cpp +++ b/testcase/audio_haltests.cpp @@ -195,7 +195,7 @@ int32_t AudioHalTest::WritePcmFromFile(pcm_handle pcm_h) } #ifdef USE_IFSTREAM - fs.read(buffer.data(), min(FramesToBytes(avail_frames), static_cast(buffer.size()))); + fs.read(buffer.data(), static_cast(min(FramesToBytes(avail_frames), static_cast(buffer.size())))); bytes_read = fs.gcount(); #else bytes_read = read(fd, buffer.data(), min(FramesToBytes(avail_frames), static_cast(buffer.size())));