A pile of inits are not initialized. But most importantly, ymin is not initialized
From: Erik Hovland <erik@hovland.org>
and could potentially be tested without having been filled if the sscanf
is given a bogus string.
---
filters/adjust/filter_adjust.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/filters/adjust/filter_adjust.c b/filters/adjust/filter_adjust.c
index 8cbbdef..52215ce 100644
a
|
b
|
newAdjustFilter (VideoFrameType inpixfmt, VideoFrameType outpixfmt, |
238 | 238 | int *width, int *height, char *options) |
239 | 239 | { |
240 | 240 | ThisFilter *filter; |
241 | | int numopts, ymin, ymax, cmin, cmax; |
| 241 | int numopts = 0, ymin = -1, ymax = -1, cmin = -1, cmax = -1; |
242 | 242 | float ygamma, cgamma; |
243 | 243 | (void) width; |
244 | 244 | (void) height; |
… |
… |
newAdjustFilter (VideoFrameType inpixfmt, VideoFrameType outpixfmt, |
251 | 251 | return NULL; |
252 | 252 | } |
253 | 253 | |
254 | | numopts = 0; |
255 | 254 | if (options) |
256 | 255 | numopts = sscanf(options, "%d:%d:%f:%d:%d:%f", &ymin, &ymax, &ygamma, |
257 | 256 | &cmin, &cmax, &cgamma); |