Skip to content

Commit

Permalink
videoroom: check participant before dereference (#3259)
Browse files Browse the repository at this point in the history
Refs #3249
  • Loading branch information
tmatth committed Aug 29, 2023
1 parent 7c7093e commit 2db954b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/plugins/janus_videoroom.c
Original file line number Diff line number Diff line change
Expand Up @@ -11606,6 +11606,12 @@ static void *janus_videoroom_handler(void *data) {
} else {
/* This is a new publisher, or an updated one */
participant = janus_videoroom_session_get_publisher(session);
if(participant == NULL) {
JANUS_LOG(LOG_ERR, "Invalid participant instance\n");
error_code = JANUS_VIDEOROOM_ERROR_UNKNOWN_ERROR;
g_snprintf(error_cause, 512, "Invalid participant instance");
goto error;
}
janus_videoroom *videoroom = participant->room;
int count = 0;
GHashTableIter iter;
Expand Down

0 comments on commit 2db954b

Please sign in to comment.