[vlc-commits] codec: schroedinger: fix potential buffer overflow.

2015-03-26 Thread Fabian Yamaguchi
vlc/vlc-2.2 | branch: master | Fabian Yamaguchi fyam...@gwdg.de | Fri Dec  5 
15:18:22 2014 +0100| [19816b865f7c80dd837e7a15dac4ef21520d9059] | committer: 
Jean-Baptiste Kempf

codec: schroedinger: fix potential buffer overflow.

The variable len is a raw 32 bit value read using GetDWBE. If this
value is larger than UINT32_MAX - sizeof(eos), this will cause an
integer overflow in the subsequent call to malloc, and finally a
buffer overflow when calling memcpy. We fix this by checking len
accordingly.

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org
(cherry picked from commit 9bb0353a5c63a7f8c6fc853faa3df4b4df1f5eb5)
Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=19816b865f7c80dd837e7a15dac4ef21520d9059
---

 modules/codec/schroedinger.c |4 
 1 file changed, 4 insertions(+)

diff --git a/modules/codec/schroedinger.c b/modules/codec/schroedinger.c
index 8178553..a816e59 100644
--- a/modules/codec/schroedinger.c
+++ b/modules/codec/schroedinger.c
@@ -1548,6 +1548,10 @@ static block_t *Encode( encoder_t *p_enc, picture_t 
*p_pic )
  * is appended to the sequence header to allow guard
  * against poor streaming servers */
 /* XXX, should this be done using the packetizer ? */
+
+if( len  UINT32_MAX - sizeof( eos ) )
+return NULL;
+
 p_enc-fmt_out.p_extra = malloc( len + sizeof( eos ) );
 if( !p_enc-fmt_out.p_extra )
 return NULL;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] Add bluray to GuessType()

2015-03-26 Thread Petri Hintukainen
vlc | branch: master | Petri Hintukainen phint...@gmail.com | Thu Mar 26 
08:36:51 2015 +| [dee576eb6fa3415ab2a3d0acab6f278d3274f0d5] | committer: 
Jean-Baptiste Kempf

Add bluray to GuessType()

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

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

 src/input/item.c |1 +
 1 file changed, 1 insertion(+)

diff --git a/src/input/item.c b/src/input/item.c
index e7c..ff53f67 100644
--- a/src/input/item.c
+++ b/src/input/item.c
@@ -969,6 +969,7 @@ static int GuessType( const input_item_t *p_item, bool 
*p_net )
 /* Short match work, not just exact match */
 { alsa,   ITEM_TYPE_CARD, false },
 { atsc,   ITEM_TYPE_CARD, false },
+{ bluray, ITEM_TYPE_DISC, false },
 { bd, ITEM_TYPE_DISC, false },
 { cable,  ITEM_TYPE_CARD, false },
 { cdda,   ITEM_TYPE_DISC, false },

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] libvlc_MetaRequest: increment item i_preparse_depth

2015-03-26 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem tho...@gllm.fr | Wed Mar 25 14:46:25 
2015 +| [f9aab1fe3415553299d5956f520571ce195939b0] | committer: 
Jean-Baptiste Kempf

libvlc_MetaRequest: increment item i_preparse_depth

libvlc_MetaRequest comes from the user, so we can increment i_preparse_depth to
force a preparsing.

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

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

 src/libvlc.c |4 
 1 file changed, 4 insertions(+)

diff --git a/src/libvlc.c b/src/libvlc.c
index cff3784..34824da 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -608,6 +608,10 @@ int libvlc_MetaRequest(libvlc_int_t *libvlc, input_item_t 
*item,
 if (unlikely(priv-parser == NULL))
 return VLC_ENOMEM;
 
+vlc_mutex_lock( item-lock );
+if( item-i_preparse_depth == 0 )
+item-i_preparse_depth = 1;
+vlc_mutex_unlock( item-lock );
 playlist_preparser_Push(priv-parser, item, i_options);
 return VLC_SUCCESS;
 }

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits


[vlc-commits] mediacodec: remove debug log

2015-03-26 Thread Thomas Guillem
vlc | branch: master | Thomas Guillem tho...@gllm.fr | Wed Mar 25 15:39:54 
2015 +| [23c8d864bb82c2b464c1c2b03b483afd9d11802b] | committer: 
Jean-Baptiste Kempf

mediacodec: remove debug log

Signed-off-by: Jean-Baptiste Kempf j...@videolan.org

 http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=23c8d864bb82c2b464c1c2b03b483afd9d11802b
---

 modules/codec/omxil/android_mediacodec.c |1 -
 1 file changed, 1 deletion(-)

diff --git a/modules/codec/omxil/android_mediacodec.c 
b/modules/codec/omxil/android_mediacodec.c
index 1bb05a4..798bec4 100644
--- a/modules/codec/omxil/android_mediacodec.c
+++ b/modules/codec/omxil/android_mediacodec.c
@@ -1085,7 +1085,6 @@ static picture_t *DecodeVideo(decoder_t *p_dec, block_t 
**pp_block)
 }
 }
 i_output_ret = GetOutput(p_dec, env, p_pic, timeout);
-msg_Err(p_dec, i_output_ret: %d, i_output_ret);
 if (i_output_ret == -1) {
 p_sys-error_state = true;
 break;

___
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits