Commit bfe1dba
committed
audio: aria: reject zero sample group size in init
aria_init() computes sgs = (depth >> 3) * channels_count and then
divides ibs by sgs. A host-supplied base config with channels_count
of 0 or depth below 8 makes sgs zero, causing a divide-by-zero.
Validate channels_count and depth before the division.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 9cd055b commit bfe1dba
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
126 | 133 | | |
127 | 134 | | |
128 | 135 | | |
| |||
0 commit comments