octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #47423] Out of bounds in liboctave/array/Array


From: Michael
Subject: [Octave-bug-tracker] [bug #47423] Out of bounds in liboctave/array/Array-util.cc
Date: Tue, 15 Mar 2016 23:30:05 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36

URL:
  <http://savannah.gnu.org/bugs/?47423>

                 Summary: Out of bounds in liboctave/array/Array-util.cc
                 Project: GNU Octave
            Submitted by: mdunphy
            Submitted on: Tue 15 Mar 2016 23:30:04 GMT
                Category: Libraries
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Other
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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




    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 15 Mar 2016 23:30:04 GMT  Name: fixtypo.patch  Size: 429B   By:
mdunphy
Fixes the conditional at line 275
<http://savannah.gnu.org/bugs/download.php?file_id=36660>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?47423>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]