scummvm/engines/tinsel
Donovan Watteau 21cd732b60 TINSEL: Fix UB for enum TINSEL_EVENT in DW2. PVS-Studio V1016
In DW2, some large TINSEL_EVENT values are read, and they're bigger than
the last TINSEL_EVENT value, but we cast them to `enum TINSEL_EVENT`
values in tinlib.cpp, which is apparently "unspecified behavior up to
C++17 and undefined behavior starting from C++17".

  tinlib.cpp:1925:39: runtime error: load of value 9041, which is not
     a valid value for type 'Tinsel::TINSEL_EVENT'
  tinlib.cpp:1935:31: runtime error: load of value 77, which is not
     a valid value for type 'Tinsel::TINSEL_EVENT'

Found with UBSan but the really clear help comes from PVS-Studio
documentation.
2022-11-29 00:41:03 +01:00
..
noir TINSEL: Fix Signed vs. Unsigned Comparison GCC Compiler Warnings 2022-06-11 22:38:46 +01:00
actors.cpp TINSEL: Fix DW2 subtitle color on big-endian systems 2022-11-27 23:06:24 +02:00
actors.h TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
adpcm.cpp
adpcm.h
anim.cpp TINSEL: Replace TinselV2 checks with comparisons 2022-04-21 20:34:17 +03:00
anim.h TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
background.cpp TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
background.h TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
bg.cpp TINSEL: Replace LockMem with GetFrame for FRAME 2022-06-10 23:12:34 +03:00
bmv.cpp JANITORIAL: Fix various single-character typos 2022-11-11 20:55:56 +01:00
bmv.h TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
cliprect.cpp TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
cliprect.h
config.cpp
config.h
configure.engine
credits.pl
cursor.cpp TINSEL: Rename the public methods in Dialogs to follow convention 2022-06-10 23:12:34 +03:00
cursor.h
debugger.cpp TINSEL: Refactor Notebook and System reels to follow naming conventions 2022-06-10 23:12:34 +03:00
debugger.h TINSEL: Add debug commands to add all clues, as well as listing them. 2022-06-10 23:12:34 +03:00
detection_tables.h JANITORIAL: Fix some lost or outdated URLs in comments 2022-05-19 07:57:31 +03:00
detection.cpp TINSEL: Change "2" to "II" in DW2 title 2022-11-28 19:43:13 +01:00
detection.h
dialogs.cpp TINSEL: Refactor Notebook and System reels to follow naming conventions 2022-06-10 23:12:34 +03:00
dialogs.h TINSEL: Rename IsConvAndNotMove -> isConvAndNotMove 2022-06-10 23:12:34 +03:00
drives.cpp TINSEL: Don't use unsafe strcat and strcpy 2022-10-23 22:46:19 +02:00
drives.h
dw.h TINSEL: Implement basic menu support (NOIR) 2022-05-11 08:59:07 +03:00
effect.cpp TINSEL: Replace TinselV2 checks with comparisons 2022-04-21 20:34:17 +03:00
events.cpp TINSEL: Refactor Notebook and System reels to follow naming conventions 2022-06-10 23:12:34 +03:00
events.h TINSEL: Fix UB for enum TINSEL_EVENT in DW2. PVS-Studio V1016 2022-11-29 00:41:03 +01:00
faders.cpp TINSEL: Replace TinselV2 checks with comparisons 2022-04-21 20:34:17 +03:00
faders.h
film.cpp TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT 2022-06-10 23:12:34 +03:00
film.h TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT 2022-06-10 23:12:34 +03:00
font.cpp TINSEL: Replace TinselV0 checks with comparisons 2022-04-21 20:34:17 +03:00
font.h
graphics.cpp TINSEL: Remove unused defines 2022-05-12 01:25:18 +03:00
graphics.h TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
handle.cpp TINSEL: Silence signed/unsigned comparison compiler warning 2022-06-02 23:41:32 +03:00
handle.h TINSEL: Simplify reading of process information 2022-05-08 13:30:04 +03:00
heapmem.cpp TINSEL: Implement DECINVMAIN libcall 2022-04-27 00:33:15 +03:00
heapmem.h
inv_objects.cpp TINSEL: Further refactor InventoryObjects 2022-06-10 23:12:34 +03:00
inv_objects.h TINSEL: Fix wrong mapping of IO_-attributes 2022-09-25 20:42:08 +02:00
mareels.cpp TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
mareels.h TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
metaengine.cpp
module.mk TINSEL: Implement Notebook logic for adding clues and showing pages. 2022-06-10 23:12:34 +03:00
move.cpp TINSEL: Remove unused defines 2022-05-12 01:25:18 +03:00
move.h
movers.cpp TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT 2022-06-10 23:12:34 +03:00
movers.h TINSEL: Replace TinselV2 checks with comparisons 2022-04-21 20:34:17 +03:00
multiobj.cpp TINSEL: Refactor Notebook and System reels to follow naming conventions 2022-06-10 23:12:34 +03:00
multiobj.h TINSEL: Minor style-fixes 2022-06-10 23:12:34 +03:00
music.cpp TINSEL: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
music.h
object.cpp TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
object.h TINSEL: Remove unneeded packing around the OBJ_INIT struct 2022-05-07 22:21:38 +03:00
palette.cpp TINSEL: Fix int vs int32 discrepancies 2022-05-08 10:32:09 +02:00
palette.h TINSEL: Fix int vs int32 discrepancies 2022-05-08 10:32:09 +02:00
pcode.cpp TINSEL: Implement a container for accessing the INV_OBJECTs 2022-05-11 08:59:07 +03:00
pcode.h TINSEL: Implement a container for accessing the INV_OBJECTs 2022-05-11 08:59:07 +03:00
pdisplay.cpp TINSEL: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
pdisplay.h
pid.h TINSEL: Remap special PID values for v3 2022-04-27 00:33:15 +03:00
play.cpp TINSEL: Replace LockMem with GetFrame for FRAME 2022-06-10 23:12:34 +03:00
play.h TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
polygons.cpp TINSEL: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
polygons.h TINSEL: Implement polygon-handling for Notebook 2022-06-10 23:12:34 +03:00
POTFILES
saveload.cpp TINSEL: Rename the public methods in Dialogs to follow convention 2022-06-10 23:12:34 +03:00
savescn.cpp TINSEL: Rename the public methods in Dialogs to follow convention 2022-06-10 23:12:34 +03:00
savescn.h
scene.cpp TINSEL: Rename the public methods in Dialogs to follow convention 2022-06-10 23:12:34 +03:00
scene.h TINSEL: Parsing of cameras & lights 2022-05-07 12:30:52 +02:00
sched.cpp TINSEL: Simplify reading of process information 2022-05-08 13:30:04 +03:00
sched.h TINSEL: Simplify reading of process information 2022-05-08 13:30:04 +03:00
scn.cpp TINSEL: Fix typos 2022-05-08 13:30:03 +03:00
scn.h
scroll.cpp TINSEL: Replace TinselV2 checks with comparisons 2022-04-21 20:34:17 +03:00
scroll.h TINSEL: Remove superfluous (and a bit confusing) pointer typedefs 2022-01-16 13:20:40 +02:00
sound.cpp TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
sound.h
strres.cpp TINSEL: Don't use unsafe sprintf and vsprintf 2022-10-23 22:46:19 +02:00
strres.h
sysvar.cpp
sysvar.h TINSEL: Remapping of Noir sysvars 2022-05-07 12:30:52 +02:00
text.cpp TINSEL: Replace TinselV3 checks with comparisons 2022-04-21 20:34:17 +03:00
text.h TINSEL: Remove non-existent function definition 2022-01-16 13:20:40 +02:00
timers.cpp
timers.h
tinlib.cpp TINSEL: Correct spelling mistake 2022-10-27 15:57:30 +02:00
tinlib.h
tinsel.cpp TINSEL: Rename the public methods in Dialogs to follow convention 2022-06-10 23:12:34 +03:00
tinsel.h TINSEL: Implement SystemReel subsystem 2022-04-27 00:33:15 +03:00
token.cpp
token.h