bugGNU Octave - Bugs: bug #53137, Variable Editor: m_table_colors...

 
 

bug #53137: Variable Editor: m_table_colors list should be used with range-checked indices

Submitter:  Dan Sebald <sebald>
Submitted:  Mon 12 Feb 2018 10:49:21 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Segfault, Bus Error, etc.
Status:  Patch Submitted Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Feb 2018 08:39:44 PM UTC, comment #2: 
John W. Eaton <jwe>
Group administrator
Mon 12 Feb 2018 10:56:19 PM UTC, comment #1: 

Patch attached.

(file #43266)

Dan Sebald <sebald>
Mon 12 Feb 2018 10:49:21 PM UTC, original submission:  

In doing some debugging on another issue, I came across a consistent crash at launch that I tracked down to insufficient colors in the m_table_colors list.  In other words, if the following is not done in the variable_editor constructor:


  // Colors.

  for (int i = 0; i < resource_manager::varedit_color_chars ().length (); i++)
    m_table_colors.append (QColor (Qt::white));


Octave will crash.

This isn't a bug per se, since it's only in modifications that I came across this.  However, Octave shouldn't crash because some color table isn't initialized sufficiently big.  Also, it wouldn't surprise me if some scenario is possible in which the resource_manager::varedit_color_chars ().length () is different between the time of initialization and notice_settings() update, e.g., a color-theme change in the OS desk top.

Changeset in a moment...

Dan Sebald <sebald>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by sebald (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-15 jwe StatusNone Patch Submitted
        Open/ClosedOpen Closed
    2018-02-12 sebald Attached File- Added octave-variable_editor_m_table_colors-djs2018feb12.patch, #43266

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code