Skip to content

Commit

Permalink
Fixed null pointer dereference while reading AMF.
Browse files Browse the repository at this point in the history
Thanks to Zengxian Ding.
  • Loading branch information
arut committed May 25, 2021
1 parent 2f2db81 commit 23e1873
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ngx_rtmp_amf.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ ngx_rtmp_amf_read(ngx_rtmp_amf_ctx_t *ctx, ngx_rtmp_amf_elt_t *elts,
} else {
switch (ngx_rtmp_amf_get(ctx, &type8, 1)) {
case NGX_DONE:
if (elts->type & NGX_RTMP_AMF_OPTIONAL) {
if (elts && elts->type & NGX_RTMP_AMF_OPTIONAL) {
return NGX_OK;
}
/* fall through */
Expand Down

0 comments on commit 23e1873

Please sign in to comment.