Fixes: signed integer overflow: -9223372036854775808 - 4607 cannot be represented in type 'long' Fixes: 45685/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5280102802391040
Unified · Split
| @@ -1217,10 +1217,12 @@ static int asf_parse_packet(AVFormatContext *s, AVIOContext *pb, AVPacket *pkt) · 1216 unmodified lines | |||
| 1217 | if ((ret = av_new_packet(&asf_st->pkt, asf_st->packet_obj_size)) < 0) | 1217 | if ((ret = av_new_packet(&asf_st->pkt, asf_st->packet_obj_size)) < 0) |
| 1218 | return ret; | 1218 | return ret; |
| 1219 | asf_st->seq = asf->packet_seq; | 1219 | asf_st->seq = asf->packet_seq; |
| 1220 | if (asf->ts_is_pts) { | 1220 | if (asf->packet_frag_timestamp != AV_NOPTS_VALUE) { |
| 1221 | asf_st->pkt.pts = asf->packet_frag_timestamp - asf->hdr.preroll; | 1221 | if (asf->ts_is_pts) { |
| 1222 | } else | 1222 | asf_st->pkt.pts = asf->packet_frag_timestamp - asf->hdr.preroll; |
| 1223 | asf_st->pkt.dts = asf->packet_frag_timestamp - asf->hdr.preroll; | 1223 | } else |
| 1224 | asf_st->pkt.dts = asf->packet_frag_timestamp - asf->hdr.preroll; | ||
| 1225 | } | ||
| 1224 | asf_st->pkt.stream_index = asf->stream_index; | 1226 | asf_st->pkt.stream_index = asf->stream_index; |
| 1225 | asf_st->pkt.pos = asf_st->packet_pos = asf->packet_pos; | 1227 | asf_st->pkt.pos = asf_st->packet_pos = asf->packet_pos; |
| 1226 | asf_st->pkt_clean = 0; | 1228 | asf_st->pkt_clean = 0; |