[PATCH 0/6] MR4185: dmusic, dmband: Skip chunks on parsing failure, ignore padding data in wave files.
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmband/band.c | 2 +- dlls/dmband/bandtrack.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/dmband/band.c b/dlls/dmband/band.c index 4c593741516..78ec68ae035 100644 --- a/dlls/dmband/band.c +++ b/dlls/dmband/band.c @@ -422,6 +422,7 @@ static HRESULT WINAPI band_persist_stream_Load(IPersistStream *iface, IStream *s } } + stream_skip_chunk(stream, &chunk); if (FAILED(hr)) return hr; if (TRACE_ON(dmband)) @@ -439,7 +440,6 @@ static HRESULT WINAPI band_persist_stream_Load(IPersistStream *iface, IStream *s } } - stream_skip_chunk(stream, &chunk); return S_OK; } diff --git a/dlls/dmband/bandtrack.c b/dlls/dmband/bandtrack.c index 5229204b284..0ec14483c33 100644 --- a/dlls/dmband/bandtrack.c +++ b/dlls/dmband/bandtrack.c @@ -568,6 +568,7 @@ static HRESULT WINAPI band_track_persist_stream_Load(IPersistStream *iface, IStr } } + stream_skip_chunk(stream, &chunk); if (FAILED(hr)) return hr; if (TRACE_ON(dmband)) @@ -590,7 +591,6 @@ static HRESULT WINAPI band_track_persist_stream_Load(IPersistStream *iface, IStr } } - stream_skip_chunk(stream, &chunk); return S_OK; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmime/seqtrack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/dmime/seqtrack.c b/dlls/dmime/seqtrack.c index a6043cb4a89..b532fc48ca6 100644 --- a/dlls/dmime/seqtrack.c +++ b/dlls/dmime/seqtrack.c @@ -404,6 +404,7 @@ static HRESULT WINAPI track_IPersistStream_Load(IPersistStream *iface, IStream * } } + stream_skip_chunk(stream, &chunk); if (FAILED(hr)) return hr; if (TRACE_ON(dmime)) @@ -446,7 +447,6 @@ static HRESULT WINAPI track_IPersistStream_Load(IPersistStream *iface, IStream * } } - stream_skip_chunk(stream, &chunk); return S_OK; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmime/segment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index d7402911f00..5f409b3cb5a 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -833,6 +833,7 @@ static HRESULT WINAPI segment_persist_stream_Load(IPersistStream *iface, IStream } } + stream_skip_chunk(stream, &chunk); if (FAILED(hr)) { WARN("Failed to load segment from stream %p, hr %#lx\n", stream, hr); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmusic/wave.c | 1 + 1 file changed, 1 insertion(+) diff --git a/dlls/dmusic/wave.c b/dlls/dmusic/wave.c index dd0b8a44779..8ee713bd4f0 100644 --- a/dlls/dmusic/wave.c +++ b/dlls/dmusic/wave.c @@ -167,6 +167,7 @@ static HRESULT parse_wave_chunk(struct wave *This, IStream *stream, struct chunk if (FAILED(hr)) break; } + if (This->format && This->data) return S_OK; return hr; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmime/segment.c | 1 - 1 file changed, 1 deletion(-) diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index 5f409b3cb5a..126bc44335d 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -816,7 +816,6 @@ static HRESULT WINAPI segment_persist_stream_Load(IPersistStream *iface, IStream case MAKE_IDTYPE(FOURCC_RIFF, mmioFOURCC('W','A','V','E')): { IDirectMusicTrack8 *track; - HRESULT hr; TRACE("Loading segment %p from wave file\n", This); -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
From: Rémi Bernon <rbernon(a)codeweavers.com> --- dlls/dmusic/wave.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dlls/dmusic/wave.c b/dlls/dmusic/wave.c index 8ee713bd4f0..27f7224af49 100644 --- a/dlls/dmusic/wave.c +++ b/dlls/dmusic/wave.c @@ -159,6 +159,11 @@ static HRESULT parse_wave_chunk(struct wave *This, IStream *stream, struct chunk hr = parse_wsmp_chunk(This, stream, &chunk); break; + case mmioFOURCC('w','a','v','u'): + case mmioFOURCC('s','m','p','l'): + case MAKE_IDTYPE(FOURCC_LIST, DMUS_FOURCC_INFO_LIST): + break; + default: FIXME("Ignoring chunk %s %s\n", debugstr_fourcc(chunk.id), debugstr_fourcc(chunk.type)); break; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
The usual but unrelated test failures for domdoc and filtergraph -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4185#note_49859
This merge request was approved by Michael Stefaniuc. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/4185
participants (2)
-
Michael Stefaniuc (@mstefani) -
Rémi Bernon