0014-decoder-check-visible-size-when-creating-buffer.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. From a38a85db58c569cc592d9380cc07096757ef3d49 Mon Sep 17 00:00:00 2001
  2. From: Francois Cartegnie <fcvlcdev@free.fr>
  3. Date: Thu, 29 Jun 2017 11:09:02 +0200
  4. Subject: [PATCH] decoder: check visible size when creating buffer
  5. early reject invalid visible size
  6. mishandled by filters.
  7. refs #18467
  8. Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
  9. ---
  10. src/input/decoder.c | 4 +++-
  11. 1 file changed, 3 insertions(+), 1 deletion(-)
  12. diff --git a/src/input/decoder.c b/src/input/decoder.c
  13. index 2c0823f..a216165 100644
  14. --- a/src/input/decoder.c
  15. +++ b/src/input/decoder.c
  16. @@ -2060,7 +2060,9 @@ static picture_t *vout_new_buffer( decoder_t *p_dec )
  17. vout_thread_t *p_vout;
  18. if( !p_dec->fmt_out.video.i_width ||
  19. - !p_dec->fmt_out.video.i_height )
  20. + !p_dec->fmt_out.video.i_height ||
  21. + p_dec->fmt_out.video.i_width < p_dec->fmt_out.video.i_visible_width ||
  22. + p_dec->fmt_out.video.i_height < p_dec->fmt_out.video.i_visible_height )
  23. {
  24. /* Can't create a new vout without display size */
  25. return NULL;
  26. --
  27. 2.1.4