[FFmpeg-cvslog] tools/target_dec_fuzzer: Fix misaligned read
Michael Niedermayer
git at videolan.org
Fri Feb 24 15:13:24 EET 2017
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Fri Feb 24 13:23:37 2017 +0100| [c87ea47481d35b0219e2e22d60f2a431286f725d] | committer: Michael Niedermayer
tools/target_dec_fuzzer: Fix misaligned read
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c87ea47481d35b0219e2e22d60f2a431286f725d
---
tools/target_dec_fuzzer.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c
index 8761d96..cb3bc50 100644
--- a/tools/target_dec_fuzzer.c
+++ b/tools/target_dec_fuzzer.c
@@ -46,6 +46,7 @@
*/
#include "libavutil/avassert.h"
+#include "libavutil/intreadwrite.h"
#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
@@ -165,7 +166,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
while (data < end && it < maxiteration) {
// Search for the TAG
while (data + sizeof(fuzz_tag) < end) {
- if (data[0] == (fuzz_tag & 0xFF) && *(const uint64_t *)(data) == fuzz_tag)
+ if (data[0] == (fuzz_tag & 0xFF) && AV_RN64(data) == fuzz_tag)
break;
data++;
}
More information about the ffmpeg-cvslog
mailing list