[cppcheck] buffer access out of bounds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zsnes (Debian) |
Fix Released
|
Unknown
|
|||
zsnes (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: zsnes
during a check with the static code analysis tool cppcheck (http://
./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[
}
}
The buffer SPCRAM is accessed out bounds.
Best regards from the cppheck-team.
Changed in zsnes (Debian): | |
status: | Unknown → New |
Changed in zsnes (Debian): | |
status: | New → Fix Released |
Hello,
The cppcheck run on Debian signaled several other warnings : http:// qa.debian. org/daca/ cppcheck/ sid/zsnes_ 1.510-2. 2.html