bugGNU Octave - Bugs: bug #47423, Out of bounds in...

 
 

bug #47423: Out of bounds in liboctave/array/Array-util.cc

Submitted by:  Michael <mdunphy>
Submitted on:  Tue 15 Mar 2016 11:30:04 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Other
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 18 Mar 2016 06:43:50 AM UTC, comment #1:

Thanks, I made this change on the default branch:

http://hg.savannah.gnu.org/hgweb/octave/rev/bbf3814049e2

Fortunately, this function is never called within Octave so this wouldn't have caused any actual failures.

Mike Miller <mtmiller>
Project Administrator
Tue 15 Mar 2016 11:30:04 PM UTC, original submission:

In liboctave/array/Array-util.cc, line 272 has this array:

static const char *tag[3] = { "row", "column", 0 };

which may be accessed out of bounds at line 275:

retval(i) = ra_idx(i).freeze (dimensions(i), tag[i < 2 ? i : 3],resize_ok);

Looks like a typo, the conditional should be: i < 2 ? i : 2

Patch included

Michael <mdunphy>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #36660:  fixtypo.patch added by mdunphy (429B - text/x-patch - Fixes the conditional at line 275)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by mdunphy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 18 Mar 2016 06:43:50 AM UTCmtmillerStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 15 Mar 2016 11:30:04 PM UTCmdunphyAttached File-=>Added fixtypo.patch, #36660

    Back to the top


    Powered by Savane 3.1-cleanup1