[Scummvm-git-logs] scummvm master -> fb5982eacb97e75d65d5fef8eb69fd8f46336807

mistydemeo noreply at scummvm.org
Wed Jun 7 19:01:22 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
fb5982eacb COMMON: do not process the tail if there is no tail


Commit: fb5982eacb97e75d65d5fef8eb69fd8f46336807
    https://github.com/scummvm/scummvm/commit/fb5982eacb97e75d65d5fef8eb69fd8f46336807
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-06-07T11:58:05-07:00

Commit Message:
COMMON: do not process the tail if there is no tail

If the illegal character scanner flags the final character, it
shouldn't continue on try to process the tail - it's the end of the
string, and indexing past that is invalid.

Changed paths:
    common/punycode.cpp


diff --git a/common/punycode.cpp b/common/punycode.cpp
index 2b6c5e6b82d..f6aba9c7a73 100644
--- a/common/punycode.cpp
+++ b/common/punycode.cpp
@@ -269,7 +269,7 @@ U32String punycode_decode(const String &src1) {
 			}
 		}
 
-		if (noncode) {
+		if (noncode && di < srclen) {
 			tail = String(src.c_str() + di) + tail;
 			src = String(src.c_str(), di);
 			srclen = src.size();




More information about the Scummvm-git-logs mailing list