Skip to content

Commit 23e1873

Browse files
committed
Fixed null pointer dereference while reading AMF.
Thanks to Zengxian Ding.
1 parent 2f2db81 commit 23e1873

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ngx_rtmp_amf.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ ngx_rtmp_amf_read(ngx_rtmp_amf_ctx_t *ctx, ngx_rtmp_amf_elt_t *elts,
328328
} else {
329329
switch (ngx_rtmp_amf_get(ctx, &type8, 1)) {
330330
case NGX_DONE:
331-
if (elts->type & NGX_RTMP_AMF_OPTIONAL) {
331+
if (elts && elts->type & NGX_RTMP_AMF_OPTIONAL) {
332332
return NGX_OK;
333333
}
334334
/* fall through */

0 commit comments

Comments
 (0)