# HG changeset patch # User Markus Mützel # Date 1592654949 -7200 # Node ID aabfd3f51d0bdbb41e317208688f034c3273f510 # Parent 4304bf2b450ba2bf0ff5d4baec241739f978792a Fix heap-buffer-overflow in scatter graphics object. * libinterp/corefcn/graphics.cc (scatter::properties::update_color): Check if seriesindex is valid (fix error if scatter::initialize has not run yet). diff -r 4304bf2b450b -r aabfd3f51d0b libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Thu Jun 18 13:26:34 2020 -0400 +++ b/libinterp/corefcn/graphics.cc Sat Jun 20 14:09:09 2020 +0200 @@ -10273,6 +10273,10 @@ if (updating_scatter_cdata) return; + Matrix series_idx = get_seriesindex ().matrix_value (); + if (series_idx.isempty ()) + return; + gh_manager& gh_mgr = octave::__get_gh_manager__ ("scatter::properties::update_color"); @@ -10283,7 +10287,6 @@ (go.get_ancestor ("axes").get_properties ()); Matrix color_order = parent_axes_prop.get_colororder ().matrix_value (); - Matrix series_idx = get_seriesindex ().matrix_value (); octave_idx_type s = (static_cast (series_idx(0)) - 1) % color_order.rows ();