[Scummvm-git-logs] scummvm master -> 1196f86b4bb8c1207e1568861979dd1a01110b6e
sev-
sev at scummvm.org
Thu Apr 30 13:16:43 UTC 2020
This automated email contains information about 6 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
34ed51e33e PARALLACTION: Fix buffer overrun
50aace7179 PARALLACTION: Fix potential undefined behaviour
1e20ac5713 GLK: QUEST: Fix va_args usage
cd42932bb2 GLK: ALAN2: Fixed more printf format strings
cd9512d4b2 GLK: HUGO: Use memmove for overlapping buffers
1196f86b4b SCUMM: Initialize memory on allocation
Commit: 34ed51e33ef46bc7f0a702232214029a5ba7e1c2
https://github.com/scummvm/scummvm/commit/34ed51e33ef46bc7f0a702232214029a5ba7e1c2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:24:34+02:00
Commit Message:
PARALLACTION: Fix buffer overrun
Changed paths:
engines/parallaction/disk_ns.cpp
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index c5720ea78c..c73e55b1a0 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -590,7 +590,7 @@ private:
off_lens = src; src = &src[4];
buf = &src[src_len];
- out = dest_end = &dest[dest_len];
+ out = dest_end = &dest[dest_len - 1];
/* skip the first few bits */
PP_READ_BITS(src[src_len + 3], x);
Commit: 50aace717916d3ffe87feb68fc7407b4c10f2f90
https://github.com/scummvm/scummvm/commit/50aace717916d3ffe87feb68fc7407b4c10f2f90
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:26:53+02:00
Commit Message:
PARALLACTION: Fix potential undefined behaviour
Changed paths:
engines/parallaction/disk_ns.cpp
diff --git a/engines/parallaction/disk_ns.cpp b/engines/parallaction/disk_ns.cpp
index c73e55b1a0..32602dffca 100644
--- a/engines/parallaction/disk_ns.cpp
+++ b/engines/parallaction/disk_ns.cpp
@@ -620,7 +620,7 @@ private:
else {
PP_READ_BITS(offbits, offset);
}
- if (&out[offset] >= dest_end) return 0; /* match_overflow */
+ if (&out[offset] > dest_end) return 0; /* match_overflow */
while (todo--) { x = out[offset]; PP_BYTE_OUT(x); }
}
Commit: 1e20ac5713e92f9570ee04240e2f71ed39657867
https://github.com/scummvm/scummvm/commit/1e20ac5713e92f9570ee04240e2f71ed39657867
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:34:04+02:00
Commit Message:
GLK: QUEST: Fix va_args usage
Changed paths:
engines/glk/quest/reserved_words.h
diff --git a/engines/glk/quest/reserved_words.h b/engines/glk/quest/reserved_words.h
index 52c3e2191a..fdfdedbcac 100644
--- a/engines/glk/quest/reserved_words.h
+++ b/engines/glk/quest/reserved_words.h
@@ -46,6 +46,7 @@ public:
_data[String(c)] = true;
c = va_arg(ap, const char *);
}
+ va_end(ap);
}
/**
Commit: cd42932bb2ae67f071b4749a06f9d023d4852680
https://github.com/scummvm/scummvm/commit/cd42932bb2ae67f071b4749a06f9d023d4852680
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:36:37+02:00
Commit Message:
GLK: ALAN2: Fixed more printf format strings
Changed paths:
engines/glk/alan2/inter.cpp
diff --git a/engines/glk/alan2/inter.cpp b/engines/glk/alan2/inter.cpp
index cdc150eaf9..766a06e04b 100644
--- a/engines/glk/alan2/inter.cpp
+++ b/engines/glk/alan2/inter.cpp
@@ -181,7 +181,7 @@ void interpret(CONTEXT, Aaddr adr) {
case C_CURVAR:
switch (I_OP(i)) {
case V_PARAM:
- if (stpflg) printf("PARAM \t%5lu\t\t(%ld)", top(), params[top() - 1].code);
+ if (stpflg) printf("PARAM \t%5lu\t\t(%u)", top(), params[top() - 1].code);
push(params[pop() - 1].code);
break;
case V_CURLOC:
@@ -607,7 +607,7 @@ void interpret(CONTEXT, Aaddr adr) {
rh = pop();
lh = pop();
if (stpflg)
- printf("STREQ \t%5d, %5d", lh, rh);
+ printf("STREQ \t%5ld, %5ld", lh, rh);
push(streq((char *)lh, (char *)rh));
if (stpflg) {
if (top()) printf("\t(TRUE)");
Commit: cd9512d4b2bafb7ec67293e65f11aef173a0f473
https://github.com/scummvm/scummvm/commit/cd9512d4b2bafb7ec67293e65f11aef173a0f473
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:42:43+02:00
Commit Message:
GLK: HUGO: Use memmove for overlapping buffers
Changed paths:
engines/glk/hugo/stringfn.cpp
diff --git a/engines/glk/hugo/stringfn.cpp b/engines/glk/hugo/stringfn.cpp
index dff653bd75..524c2a7726 100644
--- a/engines/glk/hugo/stringfn.cpp
+++ b/engines/glk/hugo/stringfn.cpp
@@ -41,11 +41,12 @@ char *StringFunctions::Left(char a[], int l) {
char *StringFunctions::Ltrim(char a[]) {
static char *temp;
+ int len = strlen(a);
temp = GetTempString();
strcpy(temp, a);
while (temp[0]==' ' || temp[0]=='\t')
- strcpy(temp, temp+1);
+ memmove(temp, temp+1, len + 1);
return temp;
}
@@ -87,10 +88,10 @@ char *StringFunctions::Rtrim(char a[]) {
return temp;
}
-char *StringFunctions::hugo_strcpy(char *s, const char *t) {
- char *r = s;
- while ((*s++ = *t++) != 0) ;
- return r;
+char *StringFunctions::hugo_strcpy(char *s, const char *t) {
+ char *r = s;
+ while ((*s++ = *t++) != 0) ;
+ return r;
}
char *StringFunctions::GetTempString() {
Commit: 1196f86b4bb8c1207e1568861979dd1a01110b6e
https://github.com/scummvm/scummvm/commit/1196f86b4bb8c1207e1568861979dd1a01110b6e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:53:12+02:00
Commit Message:
SCUMM: Initialize memory on allocation
Changed paths:
engines/scumm/imuse_digi/dimuse_codecs.cpp
diff --git a/engines/scumm/imuse_digi/dimuse_codecs.cpp b/engines/scumm/imuse_digi/dimuse_codecs.cpp
index b7468802d5..65141534b2 100644
--- a/engines/scumm/imuse_digi/dimuse_codecs.cpp
+++ b/engines/scumm/imuse_digi/dimuse_codecs.cpp
@@ -357,7 +357,7 @@ int32 decompressCodec(int32 codec, byte *compInput, byte *compOutput, int32 inpu
for (z = 1; z < outputSize; z++)
p[z] += p[z - 1];
- t_table = (byte *)malloc(outputSize);
+ t_table = (byte *)calloc(outputSize, 1);
assert(t_table);
src = compOutput;
More information about the Scummvm-git-logs
mailing list