Permalink
Browse files

SUPERNOVA: Fixes possible OOB read

  • Loading branch information...
Joefish committed Nov 22, 2018
1 parent 498de63 commit 5ff4764442b3829e2664e35f211a6c78c49ae11e
Showing with 3 additions and 3 deletions.
  1. +3 −3 engines/supernova/screen.cpp
@@ -385,15 +385,15 @@ void Screen::renderImage(ImageId id, bool removeImage) {
}

void Screen::renderImage(int section) {
if (!_currentImage)
return;

bool removeImage = false;
if (section > 128) {
removeImage = true;
section -= 128;
}

if (!_currentImage || section >= kMaxSection)
return;

do {
renderImageSection(_currentImage, section, removeImage);
section = _currentImage->_section[section].next;

0 comments on commit 5ff4764

Please sign in to comment.