Files
FFmpeg/libavfilter
Andreas Rheinhardt 2bcec40cce avfilter/vf_nnedi: Fix segfault when prescreening is disabled
Since c737f6edce prescreening is
nevertheless run because of a wrong check: "if (s->prescreen > 0)".
s->prescreen is an array of two function pointers that is contained in
the context and comparing it with 0 (i.e. NULL) is actually undefined
behaviour, because NULL and s->prescreen do not point to the same
object (NULL after all never points to any object). Nevertheless both
Clang as well as GCC compile this to code that treat s->prescreen > 0 as
true, leading to segfaults, because the code then tries to access the
-1th member of an array.

This commit fixes the check as well as another such check a few lines
below.

(Found via compiler warnings enabled by -pedantic:
"ordered comparison between pointer and zero is an extension".)

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
2021-01-24 22:37:55 +01:00
..
2020-02-14 09:59:27 +01:00
2019-10-01 14:55:43 +02:00
2021-01-01 15:25:48 +01:00
2021-01-01 15:25:48 +01:00
2016-12-01 09:53:38 +01:00
2019-05-14 15:17:14 +02:00
2019-12-10 16:09:14 +01:00
2021-01-16 14:08:59 +01:00
2020-03-17 22:46:36 +01:00
2021-01-17 12:06:01 +01:00
2021-01-17 12:06:01 +01:00
2018-11-15 14:44:24 +01:00
2018-06-21 00:31:42 +01:00
2018-05-05 21:50:22 +02:00
2017-01-12 10:22:52 +01:00
2017-07-08 11:49:54 +02:00
2021-01-16 14:08:59 +01:00
2020-02-14 21:49:47 +01:00
2019-10-23 12:37:46 +02:00
2019-09-30 16:39:39 +02:00
2020-02-04 18:28:04 +01:00
2021-01-16 14:08:59 +01:00
2018-06-21 00:31:42 +01:00
2020-02-29 22:31:01 +01:00
2020-03-17 22:46:36 +01:00
2019-09-26 08:10:31 +08:00
2020-03-17 22:46:36 +01:00
2021-01-01 15:25:48 +01:00
2019-10-18 21:57:20 +02:00
2020-03-17 22:46:36 +01:00
2020-02-04 18:28:04 +01:00
2019-10-20 18:06:26 +02:00
2020-05-23 15:52:27 +02:00
2017-12-23 10:48:14 +01:00
2020-03-17 22:46:36 +01:00