Skip to content

Commit

Permalink
添加nalu大小判断,防止异常数据
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleychen committed Mar 28, 2024
1 parent e1b6da0 commit c1eb188
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ijkmedia/ijkplayer/ff_ffplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -5506,7 +5506,7 @@ int parse_sei(AVPacket *pkt, uint8_t *uuid, uint8_t **content, int *size)

uint32_t nalu_len = convert_hex_to_decimal(p);
// printf("\n SEI===nalu_len===%d \n",nalu_len);
if (nalu_len > INT32_MAX) {
if (nalu_len > pkt->size) {
return -1;
}

Expand Down Expand Up @@ -5567,7 +5567,7 @@ int parse_sei_hevc(AVPacket *pkt, uint8_t *uuid, uint8_t **content, int *size)

uint32_t nalu_len = convert_hex_to_decimal(p);
// printf("\n SEI===nalu_len===%d \n",nalu_len);
if (nalu_len > INT32_MAX) {
if (nalu_len > pkt->size) {
return -1;
}

Expand Down

0 comments on commit c1eb188

Please sign in to comment.