ffmpeg/libavformat
Andreas Cadhalpun e7cb5d41d1 nutdec: fix illegal count check in decode_main_header
The existing check has two problems:
 1) i + count can overflow, so that the check '< 256' returns true.
 2) In the (i == 'N') case occurs a j-- so that the loop runs once more.

This can trigger the assertion 'nut->header_len[0] == 0' or cause
segmentation faults or infinite hangs.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7c24ca1bda2d4df1dc9b2b982941be532d60da21)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-28 23:22:47 +02:00
..
2013-03-17 04:38:28 +01:00
2013-05-10 16:10:52 -03:00
2013-10-13 20:13:38 +00:00
2013-10-18 19:53:47 +02:00
2013-01-22 20:27:05 +01:00
2013-10-23 11:17:03 +03:00
2013-10-13 20:13:38 +00:00
2014-11-28 18:44:37 +01:00
2012-12-04 11:25:46 +00:00
2012-12-04 11:25:46 +00:00
2013-10-12 20:21:38 +00:00
2013-10-06 19:36:53 +02:00
2012-11-24 15:04:32 +00:00
2012-10-18 00:55:03 +02:00
2012-11-19 10:19:50 +01:00
2013-10-13 20:13:38 +00:00
2013-06-28 09:04:16 +02:00
2013-01-01 19:29:04 +01:00
2013-10-13 20:13:38 +00:00
2012-10-10 15:50:32 +00:00
2012-12-05 20:18:04 +00:00
2013-01-24 15:02:44 +00:00
2013-10-13 20:13:38 +00:00
2014-06-23 16:51:09 +02:00
2013-10-31 01:55:00 +01:00
2012-12-21 00:18:34 +01:00
2013-06-20 21:49:02 +02:00
2013-09-18 14:10:05 -04:00
2012-12-05 13:01:22 +00:00
2012-12-05 13:01:22 +00:00
2013-10-18 19:35:03 +02:00
2014-12-30 15:38:20 +01:00
2013-05-24 15:36:54 +02:00
2013-07-02 18:52:45 +02:00
2013-10-13 20:13:38 +00:00
2013-07-07 18:50:03 +02:00
2014-03-13 07:41:32 +01:00
2013-10-23 11:17:03 +03:00
2014-06-23 15:10:06 +02:00
2013-10-13 20:13:38 +00:00
2013-10-22 17:09:56 +01:00
2013-10-22 17:09:56 +01:00
2013-10-13 20:13:38 +00:00
2014-11-28 18:44:37 +01:00
2013-09-21 15:36:33 +02:00
2013-01-07 11:43:20 +00:00
2013-05-01 11:56:34 +02:00
2013-10-13 20:13:38 +00:00
2013-10-14 16:29:58 +02:00
2013-10-13 20:13:38 +00:00
2013-10-13 20:13:38 +00:00
2015-04-22 12:27:23 +02:00
2014-12-19 18:03:05 -03:00
2012-08-28 22:29:20 +02:00
2013-09-21 15:36:33 +02:00
2013-10-13 20:13:38 +00:00
2013-10-13 20:13:38 +00:00
2012-12-17 13:34:30 +01:00
2015-02-01 20:23:30 +01:00
2013-10-13 20:13:38 +00:00
2012-12-28 21:50:42 +00:00
2012-12-28 21:58:03 +00:00
2013-05-26 15:48:50 +02:00
2013-08-05 10:14:42 +02:00
2014-11-28 18:44:36 +01:00
2013-04-05 14:30:56 +00:00
2012-10-15 08:12:25 +00:00
2013-08-21 05:51:41 +02:00
2015-04-23 14:31:00 +02:00
2013-10-13 20:13:38 +00:00
2012-11-04 04:46:10 +00:00
2013-01-07 10:08:38 +00:00
2013-02-13 17:36:55 +00:00
2013-12-24 07:39:31 +01:00
2013-10-13 20:13:38 +00:00
2013-10-13 20:13:38 +00:00
2013-09-21 15:36:33 +02:00