Skip to content

Commit

Permalink
videoroom: check participant before dereference (meetecho#3259)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmatth authored and Alexander Malaev committed Oct 5, 2023
1 parent e17e78b commit b4ac872
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 @@ -11569,6 +11569,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 b4ac872

Please sign in to comment.