Fix SVACE defect (SEC_INVALID_ASSIGNMENT_WITH_UNSIGNED_VALUES) 32/283232/2 accepted/tizen/unified/20221102.020526
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 20 Oct 2022 12:41:38 +0000 (21:41 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 21 Oct 2022 05:13:48 +0000 (14:13 +0900)
[Version] 0.13.22
[Issue Type] Svace

Change-Id: I5bd39baaa014475738933e7b8c13bc3b3fc2851c

mm_sound_pa_client.c

index 5681117..a7278df 100644 (file)
@@ -204,7 +204,7 @@ int mm_sound_pa_open(MMSoundHandleMode mode, int volume_config, pa_sample_spec *
                samples_per_period = (ss->rate * period_time) / 1000;
                attr.prebuf = -1;
                attr.minreq = -1;
-               attr.tlength = (ss->rate / 10) * pa_sample_size(ss) * ss->channels;
+               attr.tlength = (uint32_t)((ss->rate / 10) * pa_frame_size(ss));
                attr.maxlength = -1;
                attr.fragsize = 0;