[Scummvm-git-logs] scummvm master -> 04cdd7af0082d2774719ac9c4bae1ebce9890c43
sluicebox
22204938+sluicebox at users.noreply.github.com
Thu Oct 14 00:21:32 UTC 2021
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:
f3b04519a6 CLOUD: Fix crash on HTTP request with unparsed path
04cdd7af00 SCI: Fix kSetPort return value
Commit: f3b04519a68ee32a48666f04ceb71f23e179e004
https://github.com/scummvm/scummvm/commit/f3b04519a68ee32a48666f04ceb71f23e179e004
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-10-13T19:18:43-05:00
Commit Message:
CLOUD: Fix crash on HTTP request with unparsed path
Occurred during an nmap scan. Fixes bug #12997
Changed paths:
backends/networking/sdl_net/handlers/resourcehandler.cpp
diff --git a/backends/networking/sdl_net/handlers/resourcehandler.cpp b/backends/networking/sdl_net/handlers/resourcehandler.cpp
index ecd8eb296a..40c414da71 100644
--- a/backends/networking/sdl_net/handlers/resourcehandler.cpp
+++ b/backends/networking/sdl_net/handlers/resourcehandler.cpp
@@ -54,10 +54,13 @@ const char *ResourceHandler::determineMimeType(Common::String &filename) {
void ResourceHandler::handle(Client &client) {
Common::String filename = client.path();
- filename.deleteChar(0);
+
+ // remove leading slash
+ if (filename.size() > 0 && filename[0] == '/')
+ filename.deleteChar(0);
// if archive hidden file is requested, ignore
- if (filename.size() && filename[0] == '.')
+ if (filename.size() > 0 && filename[0] == '.')
return;
// if file not found, don't set handler either
Commit: 04cdd7af0082d2774719ac9c4bae1ebce9890c43
https://github.com/scummvm/scummvm/commit/04cdd7af0082d2774719ac9c4bae1ebce9890c43
Author: sluicebox (22204938+sluicebox at users.noreply.github.com)
Date: 2021-10-13T19:18:43-05:00
Commit Message:
SCI: Fix kSetPort return value
SSCI doesn't return zero; it doesn't return anything. This shouldn't
affect any games since no scripts should depend on a non-existent
return value, but this discrepancy came up while investigating a
fan script that accidentally relies on this.
Changed paths:
engines/sci/engine/kgraphics.cpp
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index a1d8fd70cc..2ed31016c6 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -1119,7 +1119,7 @@ reg_t kSetPort(EngineState *s, int argc, reg_t *argv) {
error("SetPort was called with %d parameters", argc);
break;
}
- return NULL_REG;
+ return s->r_acc;
}
reg_t kDrawCel(EngineState *s, int argc, reg_t *argv) {
More information about the Scummvm-git-logs
mailing list