mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
random_seed: fix out of array read
Fixes CID733787 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
adcbb3fd8b
commit
7fe5548531
@ -95,7 +95,7 @@ static uint32_t get_generic_seed(void)
|
|||||||
av_sha_init(sha, 160);
|
av_sha_init(sha, 160);
|
||||||
av_sha_update(sha, (uint8_t*)buffer, sizeof(buffer));
|
av_sha_update(sha, (uint8_t*)buffer, sizeof(buffer));
|
||||||
av_sha_final(sha, digest);
|
av_sha_final(sha, digest);
|
||||||
return AV_RB32(digest) + AV_RB32(digest+32);
|
return AV_RB32(digest) + AV_RB32(digest+16);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t av_get_random_seed(void)
|
uint32_t av_get_random_seed(void)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user