[ scummvm-Bugs-3492133 ] TSAGE: Out of bound access

SourceForge.net noreply at sourceforge.net
Thu Feb 23 16:40:24 CET 2012


Bugs item #3492133, was opened at 2012-02-23 07:40
Message generated for change (Tracker Item Submitted) made by fingolfin
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=3492133&group_id=37116

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: Ringworld: Revenge of the Patriarch
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Max Horn (fingolfin)
Assigned to: Nobody/Anonymous (nobody)
Summary: TSAGE: Out of bound access

Initial Comment:
Compiling ScummVM with clang uncovered the following out-of-bound pokes in tsage:


    C++      engines/tsage/ringworld2/ringworld2_scenes1.o
../../engines/tsage/ringworld2/ringworld2_scenes1.cpp:11435:2: error: array index of '771' indexes past the
      end of an array (that contains 768 elements) [-Werror,-Warray-bounds]
        R2_GLOBALS._scenePalette._palette[771] = 255;
        ^                                 ~~~
../../engines/tsage/globals.h:123:20: note: instantiated from:
#define R2_GLOBALS (*((::TsAGE::Ringworld2::Ringworld2Globals *)g_globals))
                   ^
../../engines/tsage/core.h:358:2: note: array '_palette' declared here
        byte _palette[256 * 3];
        ^
../../engines/tsage/ringworld2/ringworld2_scenes1.cpp:11436:2: error: array index of '772' indexes past the
      end of an array (that contains 768 elements) [-Werror,-Warray-bounds]
        R2_GLOBALS._scenePalette._palette[772] = 255;
        ^                                 ~~~
../../engines/tsage/globals.h:123:20: note: instantiated from:
#define R2_GLOBALS (*((::TsAGE::Ringworld2::Ringworld2Globals *)g_globals))
                   ^
../../engines/tsage/core.h:358:2: note: array '_palette' declared here
        byte _palette[256 * 3];
        ^
../../engines/tsage/ringworld2/ringworld2_scenes1.cpp:11437:2: error: array index of '773' indexes past the
      end of an array (that contains 768 elements) [-Werror,-Warray-bounds]
        R2_GLOBALS._scenePalette._palette[773] = 255;
        ^                                 ~~~
../../engines/tsage/globals.h:123:20: note: instantiated from:
#define R2_GLOBALS (*((::TsAGE::Ringworld2::Ringworld2Globals *)g_globals))
                   ^
../../engines/tsage/core.h:358:2: note: array '_palette' declared here
        byte _palette[256 * 3];
        ^
3 errors generated.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418820&aid=3492133&group_id=37116




More information about the Scummvm-tracker mailing list