diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2016-09-12 14:42:28 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2016-09-12 14:42:27 -0700 |
commit | e8afdbad3e09004958777fc5f19a94308e9d3c1f (patch) | |
tree | b20c9e67b196163766c463cc3344ec05fc0b1770 /sound | |
parent | a1bf0348c4a9ef98de57bdfaf09c37a14465ce2b (diff) | |
parent | 287879c3beb3e50decdbec07895d0698d7212a9a (diff) |
Merge "ASoC: msm: Add Buffer overflow check"
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/msm/qdsp6v2/q6asm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/msm/qdsp6v2/q6asm.c b/sound/soc/msm/qdsp6v2/q6asm.c index 20d3f5212323..206fbec249fa 100644 --- a/sound/soc/msm/qdsp6v2/q6asm.c +++ b/sound/soc/msm/qdsp6v2/q6asm.c @@ -1195,7 +1195,7 @@ err: int q6asm_audio_client_buf_alloc(unsigned int dir, struct audio_client *ac, unsigned int bufsz, - unsigned int bufcnt) + uint32_t bufcnt) { int cnt = 0; int rc = 0; @@ -1222,7 +1222,7 @@ int q6asm_audio_client_buf_alloc(unsigned int dir, return 0; } mutex_lock(&ac->cmd_lock); - if (bufcnt > (LONG_MAX/sizeof(struct audio_buffer))) { + if (bufcnt > (U32_MAX/sizeof(struct audio_buffer))) { pr_err("%s: Buffer size overflows", __func__); mutex_unlock(&ac->cmd_lock); goto fail; |