last-svn-commit-907-ga714708 Fix use of uninitialized values.

* scribo/primitive/extract/lines_h_thick_and_thin.hh, * scribo/primitive/remove/separators.hh: Initialize border. --- scribo/ChangeLog | 7 +++++++ .../primitive/extract/lines_h_thick_and_thin.hh | 1 + scribo/scribo/primitive/remove/separators.hh | 2 ++ 3 files changed, 10 insertions(+), 0 deletions(-) diff --git a/scribo/ChangeLog b/scribo/ChangeLog index cc7cefc..1814185 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,5 +1,12 @@ 2011-06-01 Guillaume Lazzara <z@lrde.epita.fr> + Fix use of uninitialized values. + + * scribo/primitive/extract/lines_h_thick_and_thin.hh, + * scribo/primitive/remove/separators.hh: Initialize border. + +2011-06-01 Guillaume Lazzara <z@lrde.epita.fr> + Fix a serious memory leak. * scribo/core/component_info.hh, diff --git a/scribo/scribo/primitive/extract/lines_h_thick_and_thin.hh b/scribo/scribo/primitive/extract/lines_h_thick_and_thin.hh index 53a5c32..45b2ad3 100644 --- a/scribo/scribo/primitive/extract/lines_h_thick_and_thin.hh +++ b/scribo/scribo/primitive/extract/lines_h_thick_and_thin.hh @@ -156,6 +156,7 @@ namespace scribo extension::adjust_fill(input, length / 2, 0); accu::count_value<bool> accu(true); image2d<unsigned> count = accu::transform_line(accu, input, length, 1); + border::fill(count, 0); // FIXME: correct? image2d<value::int_u8> output; initialize(output, count); diff --git a/scribo/scribo/primitive/remove/separators.hh b/scribo/scribo/primitive/remove/separators.hh index 23d5fd1..1b75494 100644 --- a/scribo/scribo/primitive/remove/separators.hh +++ b/scribo/scribo/primitive/remove/separators.hh @@ -88,6 +88,8 @@ namespace scribo mln_concrete(I) output = duplicate(input); border::resize(separators, output.border()); + border::fill(separators, 0); // FIXME: we should rewrite image + // browsing below instead. typedef const mln_value(I)* sep_ptr_t; sep_ptr_t -- 1.5.6.5
participants (1)
-
Guillaume Lazzara