The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code)
The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in order to continue parsing. This adds a check with log message in ff_asf_handle_byte_array to handle those (rare) cases. v2: Rebased & PING v3: Adjustments suggested by Michael v4: 1 of 11 merged, 10 to go.. v5: adjusted commit message of 4/10 as requested softworkz (10): libavformat/asf: fix handling of byte array length values libavformat/asfdec: fix get_value return type and add checks for libavformat/asfdec: fix type of value_len libavformat/asfdec: fixing get_tag libavformat/asfdec: implement parsing of GUID values libavformat/asfdec: avoid clang warnings libavformat/asfdec: remove variable redefinition in inner scope libavformat/asfdec: ensure variables are initialized libavformat/asfdec: fix parameter type in asf_read_stream_propertie() libavformat/asfdec: fix variable types and add checks for unsupported values libavformat/asf.c | 8 +- libavformat/asf.h | 2 +- libavformat/asfdec_f.c | 338 +++++++++++++++++++++++++++-------------- 3 files changed, 229 insertions(+), 119 deletions(-) base-commit: 9ab20b1614194280b862d98dfcdb7b1bcff03329 Published-As: https://github.com/ffstaging/FFmpeg/releases/tag/pr-ffstaging-12%2Fsoftworkz%2Fmaster-upstream_asf_4-v5 Fetch-It-Via: git fetch https://github.com/ffstaging/FFmpeg pr-ffstaging-12/softworkz/master-upstream_asf_4-v5 Pull-Request: https://github.com/ffstaging/FFmpeg/pull/12 Range-diff vs v4: 1: 60966b7907 = 1: 7505ffa3c5 libavformat/asf: fix handling of byte array length values 2: 5acab7b52b = 2: f2d0b72bf0 libavformat/asfdec: fix get_value return type and add checks for 3: 97e0d765c9 = 3: 99660db6ef libavformat/asfdec: fix type of value_len 4: 025123f72d = 4: 8aaab15e8b libavformat/asfdec: fixing get_tag 5: 2d01e4dff5 = 5: ba31d01715 libavformat/asfdec: implement parsing of GUID values 6: 33b3d163df ! 6: d171cd5184 libavformat/asfdec: fix macro definition and use @@ Metadata Author: softworkz <softwo...@hotmail.com> ## Commit message ## - libavformat/asfdec: fix macro definition and use + libavformat/asfdec: avoid clang warnings + + such as: + - bugprone-macro-parentheses + - wextra-semi-stmt Signed-off-by: softworkz <softwo...@hotmail.com> 7: 1509b83f47 = 7: 0d032d9d4c libavformat/asfdec: remove variable redefinition in inner scope 8: fd31b0be2e = 8: 6bdb2d8bec libavformat/asfdec: ensure variables are initialized 9: f8728b1c51 = 9: d510093ed6 libavformat/asfdec: fix parameter type in asf_read_stream_propertie() 10: 78ed5aeb38 = 10: a05986d76b libavformat/asfdec: fix variable types and add checks for unsupported values -- ffmpeg-codebot _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".