Skip to content

Commit 0dfc942

Browse files
committed
32-bit uninitialized memory fix
1 parent eee9118 commit 0dfc942

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/FACT_internal.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -1667,7 +1667,8 @@ void FACT_INTERNAL_OnBufferEnd(FAudioVoiceCallback *callback, void* pContext)
16671667
/* Read! */
16681668
ovlp.Internal = NULL;
16691669
ovlp.InternalHigh = NULL;
1670-
ovlp.Pointer = (void*) (size_t) c->wave->streamOffset;
1670+
ovlp.Offset = c->wave->streamOffset;
1671+
ovlp.OffsetHigh = 0; /* I sure hope so... */
16711672
ovlp.hEvent = NULL;
16721673
c->wave->parentBank->parentEngine->pReadFile(
16731674
c->wave->parentBank->io,
@@ -2764,12 +2765,13 @@ uint32_t FACT_INTERNAL_ParseWaveBank(
27642765

27652766
ovlp.Internal = NULL;
27662767
ovlp.InternalHigh = NULL;
2768+
ovlp.OffsetHigh = 0; /* I sure hope so... */
27672769
ovlp.hEvent = NULL;
27682770

27692771
#define SEEKSET(loc) \
2770-
ovlp.Pointer = (void*) ((size_t) offset + loc);
2772+
ovlp.Offset = offset + loc;
27712773
#define SEEKCUR(loc) \
2772-
ovlp.Pointer = (void*) ((size_t) ovlp.Pointer + loc);
2774+
ovlp.Offset += loc;
27732775
#define READ(dst, size) \
27742776
pRead(io, dst, size, NULL, &ovlp); \
27752777
pOverlap(io, &ovlp, &read, 1); \

0 commit comments

Comments
 (0)