mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
func_scramble: Fix null pointer dereference.
Fix segfault due to null pointer dereference inside the audiohook callback. ASTERISK-30220 #close Change-Id: Ideb80f606974366e89d619d908744230b5a5a259
This commit is contained in:
committed by
Friendly Automation
parent
abe1465a1a
commit
c6ca266acd
@@ -125,6 +125,7 @@ static int scramble_callback(struct ast_audiohook *audiohook, struct ast_channel
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (frame->frametype == AST_FRAME_VOICE) { /* only invert voice frequencies */
|
if (frame->frametype == AST_FRAME_VOICE) { /* only invert voice frequencies */
|
||||||
|
ni = datastore->data;
|
||||||
/* Based on direction of frame, and confirm it is applicable */
|
/* Based on direction of frame, and confirm it is applicable */
|
||||||
if (!(direction == AST_AUDIOHOOK_DIRECTION_READ ? ni->rx : ni->tx)) {
|
if (!(direction == AST_AUDIOHOOK_DIRECTION_READ ? ni->rx : ni->tx)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
Reference in New Issue
Block a user