Public bug reported:

Binary package hint: zsnes

during a check with the static code analysis tool cppcheck
(http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page)
the tool discovered a severe error in the sources  of
zsnes_1.510.tar.gz. Here is the report of cppcheck:

./src/initc.c:2764 [error] - Array 'SPCRAM[65472]' index 65535 out of
bounds

Take a look at the source (here is reduced sample to show what is going
on):

#include <iostream>

int main()
{
    int i;
    int SPCRAM[65472];
//    std::cout << 0x40 << std::endl;
//    std::cout << 0xFFC0 << std::endl;    
    for(i = 0;i<0x40;i++)
    {
      SPCRAM[0xFFC0+i] = 0;
    }
}

The buffer SPCRAM is accessed out bounds.

Best regards from the cppheck-team.

** Affects: zsnes (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/695507

Title:
  [cppcheck] buffer access out of bounds

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to