diff options
author | Shalini Manjunatha <shalma@codeaurora.org> | 2021-06-11 17:07:02 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-07-11 23:05:57 -0700 |
commit | 4ed2980988f4f664d0dca22969314309a5f4a9da (patch) | |
tree | bc5bb40a79d31d25e650e0bacb697526b6df6439 | |
parent | 6cbe136ea1fc6e15d0a5d16b7f2730a7875c4f9c (diff) |
hal: typecasting variable to avoid multiplication overflow error
-> typecasting variable in order to avoid mul overflow leading
to SIGABORT
Change-Id: I58ccdd55908f4844d5228d1723f86bf569cbd4aa
-rw-r--r-- | hal/audio_extn/soundtrigger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hal/audio_extn/soundtrigger.c b/hal/audio_extn/soundtrigger.c index 04f22688..5d6624d0 100644 --- a/hal/audio_extn/soundtrigger.c +++ b/hal/audio_extn/soundtrigger.c @@ -425,7 +425,7 @@ exit: in->is_st_session_active = false; memset(buffer, 0, bytes); ALOGV("%s: read failed status %d - sleep", __func__, ret); - usleep((bytes * 1000000) / (audio_stream_in_frame_size((struct audio_stream_in *)in) * + usleep(((useconds_t)bytes * 1000000) / (audio_stream_in_frame_size((struct audio_stream_in *)in) * in->config.rate)); } return ret; |