[Scummvm-git-logs] scummvm master -> c4edac23b2bd8c4024785e8701b61fe1fad13724
bonki
bonki at users.noreply.github.com
Sat May 5 17:54:50 CEST 2018
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
88d4e5475d PSP: Fix UB (use of deallocated memory)
c4edac23b2 LAB: Fix UB (use of deallocated memory)
Commit: 88d4e5475d6541f8cc1bf5ddda81f2755ec06ba4
https://github.com/scummvm/scummvm/commit/88d4e5475d6541f8cc1bf5ddda81f2755ec06ba4
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-05T17:54:46+02:00
Commit Message:
PSP: Fix UB (use of deallocated memory)
Changed paths:
backends/saves/psp/psp-saves.cpp
diff --git a/backends/saves/psp/psp-saves.cpp b/backends/saves/psp/psp-saves.cpp
index 9d9affb..ba09223 100644
--- a/backends/saves/psp/psp-saves.cpp
+++ b/backends/saves/psp/psp-saves.cpp
@@ -60,16 +60,15 @@ PSPSaveFileManager::PSPSaveFileManager(const Common::String &defaultSavepath)
*/
void PSPSaveFileManager::checkPath(const Common::FSNode &dir) {
- const char *savePath = dir.getPath().c_str();
clearError();
PowerMan.beginCriticalSection();
//check if the save directory exists
- SceUID fd = sceIoDopen(savePath);
+ SceUID fd = sceIoDopen(dir.getPath().c_str());
if (fd < 0) {
//No? then let's create it.
- sceIoMkdir(savePath, 0777);
+ sceIoMkdir(dir.getPath().c_str(), 0777);
} else {
//it exists, so close it again.
sceIoDclose(fd);
Commit: c4edac23b2bd8c4024785e8701b61fe1fad13724
https://github.com/scummvm/scummvm/commit/c4edac23b2bd8c4024785e8701b61fe1fad13724
Author: Adrian Frühwirth (bonki at users.noreply.github.com)
Date: 2018-05-05T17:54:46+02:00
Commit Message:
LAB: Fix UB (use of deallocated memory)
Changed paths:
engines/lab/map.cpp
diff --git a/engines/lab/map.cpp b/engines/lab/map.cpp
index 057cac3..a856b76 100644
--- a/engines/lab/map.cpp
+++ b/engines/lab/map.cpp
@@ -367,13 +367,11 @@ void LabEngine::drawMap(uint16 curRoom, uint16 curMsg, uint16 floorNum, bool fad
_imgHugeMaze->drawImage(_utils->mapScaleX(524), _utils->mapScaleY(97));
} else if (floorNum == kFloorSurMaze) {
Common::Rect textRect = Common::Rect(_utils->mapScaleX(360), 0, _utils->mapScaleX(660), _utils->mapScaleY(450));
- const char *textPtr = _resource->getStaticText(kTextSurmazeMessage).c_str();
- _graphics->flowText(_msgFont, 0, 7, 0, true, true, true, true, textRect, textPtr);
+ _graphics->flowText(_msgFont, 0, 7, 0, true, true, true, true, textRect, _resource->getStaticText(kTextSurmazeMessage).c_str());
}
if ((floorNum >= kFloorLower) && (floorNum <= kFloorCarnival)) {
- const char *textPrt = _resource->getStaticText(floorNum - 1).c_str();
- _graphics->flowText(_msgFont, 0, 5, 3, true, true, true, true, _utils->vgaRectScale(14, 75, 134, 97), textPrt);
+ _graphics->flowText(_msgFont, 0, 5, 3, true, true, true, true, _utils->vgaRectScale(14, 75, 134, 97), _resource->getStaticText(floorNum - 1).c_str());
}
if (!_rooms[curMsg]._roomMsg.empty())
More information about the Scummvm-git-logs
mailing list