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

Submitted by:  David Binderman <dcb314>
Submitted on:  Sun 08 Sep 2013 09:12:29 AM UTC  
 
Category: cygnalSeverity: 3 - Normal
Release: 0.8.10Status: Invalid
Privacy: PublicAssigned to: Bastiaan Jacques <bjacques>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

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>
Project MemberIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

     

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

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 08 Sep 2013 09:28:39 AM UTCbjacquesCategoryNone=>cygnal
      StatusNone=>Invalid
      Assigned toNone=>bjacques
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1