History

avcodec/atsc_a53: use AVERROR_INVALIDDATA

Limin Wang committed 5 years ago

Commit cd38fbf1 parent 0feb7c81 file · +3 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/atsc_a53.c+3−3
@@ -73,7 +73,7 @@ int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size) · 72 unmodified lines
73 int ret, cc_count;73 int ret, cc_count;
74 74
75 if (size < 3)75 if (size < 3)
76 return AVERROR(EINVAL);76 return AVERROR_INVALIDDATA;
77 77
78 ret = init_get_bits8(&gb, data, size);78 ret = init_get_bits8(&gb, data, size);
79 if (ret < 0)79 if (ret < 0)
@@ -95,12 +95,12 @@ int ff_parse_a53_cc(AVBufferRef **pbuf, const uint8_t *data, int size) · 15 unmodified lines
95 95
96 /* 3 bytes per CC plus one byte marker_bits at the end */96 /* 3 bytes per CC plus one byte marker_bits at the end */
97 if (cc_count * 3 >= (get_bits_left(&gb) >> 3))97 if (cc_count * 3 >= (get_bits_left(&gb) >> 3))
98 return AVERROR(EINVAL);98 return AVERROR_INVALIDDATA;
99 99
100 new_size = (old_size + cc_count * 3);100 new_size = (old_size + cc_count * 3);
101 101
102 if (new_size > INT_MAX)102 if (new_size > INT_MAX)
103 return AVERROR(EINVAL);103 return AVERROR_INVALIDDATA;
104 104
105 /* Allow merging of the cc data from two fields. */105 /* Allow merging of the cc data from two fields. */
106 ret = av_buffer_realloc(pbuf, new_size);106 ret = av_buffer_realloc(pbuf, new_size);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t