[vlc-commits] mux: ogg: fix pointer arithmetic (cid #1048982)

Tristan Matthews git at videolan.org
Sat Jul 26 01:19:58 CEST 2014


vlc/vlc-2.2 | branch: master | Tristan Matthews <le.businessman at gmail.com> | Tue Jul 15 21:25:05 2014 -0400| [9bb9360e7cde0ecf3605e51dc63d9ab224640264] | committer: Jean-Baptiste Kempf

mux: ogg: fix pointer arithmetic (cid #1048982)

Extra header is stored at &ogg_header + (1 * sizeof(ogg_header)),
not &ogg_header + (sizeof(ogg_header) * sizeof(ogg_header)).

(cherry picked from commit 9a220019c9865f3d7db2c7601d2930632b7c593e)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=9bb9360e7cde0ecf3605e51dc63d9ab224640264
---

 modules/mux/ogg.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/mux/ogg.c b/modules/mux/ogg.c
index 02b844f..c599199 100644
--- a/modules/mux/ogg.c
+++ b/modules/mux/ogg.c
@@ -908,7 +908,7 @@ static int32_t OggFillDsHeader( uint8_t *p_buffer, oggds_header_t *p_oggds_heade
     /* extra header */
     if( p_oggds_header->i_size > 0 )
     {
-        memcpy( &p_buffer[index], p_oggds_header + sizeof(*p_oggds_header), p_oggds_header->i_size );
+        memcpy( &p_buffer[index], (uint8_t *) p_oggds_header + sizeof(*p_oggds_header), p_oggds_header->i_size );
         index += p_oggds_header->i_size;
     }
 



More information about the vlc-commits mailing list