[FFmpeg-cvslog] avutil/random_seed: Use uint64 instead of uint8 for struct to avoid potential alignment issues

Michael Niedermayer git at videolan.org
Wed Dec 21 04:38:26 EET 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Wed Dec 21 03:11:44 2016 +0100| [54931fd0fb820658042e84e6245162900796ad4d] | committer: Michael Niedermayer

avutil/random_seed: Use uint64 instead of uint8 for struct to avoid potential alignment issues

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=54931fd0fb820658042e84e6245162900796ad4d
---

 libavutil/random_seed.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/random_seed.c b/libavutil/random_seed.c
index d1ded7b..79bc7af 100644
--- a/libavutil/random_seed.c
+++ b/libavutil/random_seed.c
@@ -64,7 +64,7 @@ static int read_random(uint32_t *dst, const char *file)
 
 static uint32_t get_generic_seed(void)
 {
-    uint8_t tmp[120];
+    uint64_t tmp[120/8];
     struct AVSHA *sha = (void*)tmp;
     clock_t last_t  = 0;
     static uint64_t i = 0;



More information about the ffmpeg-cvslog mailing list