bugGnash - The GNU Flash player - Bugs: bug #39985, rtmp_msg.cpp:173: off by one error

 
 

bug #39985: rtmp_msg.cpp:173: off by one error

Submitter:  David Binderman <dcb314>
Submitted:  Sun 08 Sep 2013 09:12:29 AM UTC
   
 
Category:  cygnal Severity:  3 - Normal
Release:  0.8.10 Status:  Invalid
Privacy:  Public Assigned to:  bjacques
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 08 Sep 2013 10:00:00 AM UTC, comment #2: 


>It is probably better to run analysis tools over current master


Feel free.

https://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page

I think it has more to say than the bug I mentioned.


David Binderman <dcb314>
Sun 08 Sep 2013 09:28:39 AM UTC, comment #1: 

It is probably better to run analysis tools over current master (see below), and the preferred construct for suggested changes is a patch, generated for instance by git format-patch.

commit ae47be9a85eed55aaa99bba1c12959e249f06944
Author: Bastiaan Jacques <bastiaan@bjacques.org>
Date:   Sat Jun 1 11:58:50 2013 +0200

    Fix potential out-of-bounds vector access.
   
    If |index == _amfobjs.size()| then |_amfobjs[index]| is out of bounds. Found using cppcheck.

Bastiaan Jacques <bjacques>
Group Member
Sun 08 Sep 2013 09:12:29 AM UTC, original submission:  

I just ran static analyser "cppcheck" over the source
code of gnash-0.8.10

It said

[rtmp_msg.cpp:173]: (error) When index==_amfobjs.size(), _amfobjs[index] is out of bounds.

Source code is

    if (index <= _amfobjs.size()) {
    return _amfobjs[index];
    }

Suggest swap "<=" for "<".


David Binderman <dcb314>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bjacques (Posted a comment)
  • -email is unavailable- added by dcb314 (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 logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-09-08 bjacques CategoryNone cygnal
        StatusNone Invalid
        Assigned toNone bjacques
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-aa77.
    Corresponding source code