Skip to content

Commit c6ca266

Browse files
InterLinked1Friendly Automation
authored andcommitted
func_scramble: Fix null pointer dereference.
Fix segfault due to null pointer dereference inside the audiohook callback. ASTERISK-30220 #close Change-Id: Ideb80f606974366e89d619d908744230b5a5a259
1 parent abe1465 commit c6ca266

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

funcs/func_scramble.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static int scramble_callback(struct ast_audiohook *audiohook, struct ast_channel
125125
}
126126

127127
if (frame->frametype == AST_FRAME_VOICE) { /* only invert voice frequencies */
128+
ni = datastore->data;
128129
/* Based on direction of frame, and confirm it is applicable */
129130
if (!(direction == AST_AUDIOHOOK_DIRECTION_READ ? ni->rx : ni->tx)) {
130131
return 0;

0 commit comments

Comments
 (0)