mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 11:06:31 +00:00
frame.c: validate frame data length is less than samples when adjusting volume
Resolves: #1230
(cherry picked from commit 113c7d0a8d
)
This commit is contained in:
@@ -817,9 +817,7 @@ int ast_frame_adjust_volume_float(struct ast_frame *f, float adjustment)
|
|||||||
|
|
||||||
if ((f->frametype != AST_FRAME_VOICE) || !(ast_format_cache_is_slinear(f->subclass.format))) {
|
if ((f->frametype != AST_FRAME_VOICE) || !(ast_format_cache_is_slinear(f->subclass.format))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
} else if (!adjustment || (f->samples > f->datalen)) {
|
||||||
|
|
||||||
if (!adjustment) {
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user