]> git.sesse.net Git - ffmpeg/commitdiff
lavc/qtrle: Avoid an unaligned 64-bit write.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Fri, 15 Mar 2019 00:14:58 +0000 (01:14 +0100)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 20 Mar 2019 16:16:02 +0000 (17:16 +0100)
pixel_ptr can be increased by 4.
Fixes a crash on sparc64.

libavcodec/qtrle.c
libavcodec/version.h

index 1cb3eb05bd1ee299b4b9eb9021357026ff7860e2..1613530e02dc7089d894777fc58beb428d42f5fb 100644 (file)
@@ -388,7 +388,7 @@ static void qtrle_decode_32bpp(QtrleContext *s, int row_ptr, int lines_to_change
                 /* copy pixels directly to output */
                 rle_code_half = rle_code / 2;
                 while (rle_code_half--) { /* copy 2 argb raw value at the same time */
-                    AV_WN64A(rgb + pixel_ptr, bytestream2_get_ne64(&s->g));
+                    AV_WN64(rgb + pixel_ptr, bytestream2_get_ne64(&s->g));
                     pixel_ptr += 8;
                 }
 
index a217283b035cc77e8dbfb8270f03bf5ac6248d5c..348b4d030043ae8b9c9c5c55ceeb29a5006148d3 100644 (file)
@@ -29,7 +29,7 @@
 
 #define LIBAVCODEC_VERSION_MAJOR  58
 #define LIBAVCODEC_VERSION_MINOR  47
-#define LIBAVCODEC_VERSION_MICRO 104
+#define LIBAVCODEC_VERSION_MICRO 105
 
 #define LIBAVCODEC_VERSION_INT  AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
                                                LIBAVCODEC_VERSION_MINOR, \