Skip to content
This repository has been archived by the owner on Jun 4, 2023. It is now read-only.

Commit

Permalink
tools/target_dec_fuzzer: Fix misaligned read
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Feb 24, 2017
1 parent 2b8b792 commit c87ea47
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/target_dec_fuzzer.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
*/

#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"

#include "libavcodec/avcodec.h"
#include "libavformat/avformat.h"
Expand Down Expand Up @@ -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++;
}
Expand Down

0 comments on commit c87ea47

Please sign in to comment.