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

Tristan Matthews git at videolan.org
Wed Jul 16 03:28:59 CEST 2014


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

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)).

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

 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