tools/target_dec_fuzzer: Fix misaligned read
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2b8b7921c5
commit
c87ea47481
@ -46,6 +46,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
|
#include "libavutil/intreadwrite.h"
|
||||||
|
|
||||||
#include "libavcodec/avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavformat/avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
@ -165,7 +166,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
|||||||
while (data < end && it < maxiteration) {
|
while (data < end && it < maxiteration) {
|
||||||
// Search for the TAG
|
// Search for the TAG
|
||||||
while (data + sizeof(fuzz_tag) < end) {
|
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;
|
break;
|
||||||
data++;
|
data++;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user