diff --git a/bochs/iodev/hdimage.cc b/bochs/iodev/hdimage.cc index f3aa20d44..4d16bfdba 100644 --- a/bochs/iodev/hdimage.cc +++ b/bochs/iodev/hdimage.cc @@ -1006,6 +1006,7 @@ int redolog_t::make_header(const char* type, Bit64u size) Bit32u flip=0; // Set standard header values + memset(&header, 0, sizeof(redolog_header_t)); strcpy((char*)header.standard.magic, STANDARD_HEADER_MAGIC); strcpy((char*)header.standard.type, REDOLOG_TYPE); strcpy((char*)header.standard.subtype, type); diff --git a/bochs/iodev/sound/sb16.cc b/bochs/iodev/sound/sb16.cc index b87e0dc00..846c1dea5 100644 --- a/bochs/iodev/sound/sb16.cc +++ b/bochs/iodev/sound/sb16.cc @@ -213,6 +213,8 @@ bx_sb16_c::bx_sb16_c(void) memset(&mpu401, 0, sizeof(mpu401)); memset(&dsp, 0, sizeof(dsp)); memset(&opl, 0, sizeof(opl)); + currentdma8 = 0; + currentdma16 = 0; mpu401.timer_handle = BX_NULL_TIMER_HANDLE; dsp.timer_handle = BX_NULL_TIMER_HANDLE; opl.timer_handle = BX_NULL_TIMER_HANDLE; diff --git a/bochs/iodev/vvfat.cc b/bochs/iodev/vvfat.cc index d19d3488b..b6b96674a 100644 --- a/bochs/iodev/vvfat.cc +++ b/bochs/iodev/vvfat.cc @@ -113,6 +113,7 @@ static inline int array_ensure_allocated(array_t* array, int index) array->pointer = (char*)realloc(array->pointer, new_size); if (!array->pointer) return -1; + memset(array->pointer + array->size, 0, new_size - array->size); array->size = new_size; array->next = index + 1; }