Removed patch to reallocate buffer when adding records to AVI files (fixed upstream).

This commit is contained in:
Sebastian Lackner 2014-12-31 23:45:20 +01:00
parent 706ff96060
commit b5e303e711
5 changed files with 2 additions and 61 deletions

View File

@ -119,7 +119,7 @@ Included bug fixes and improvements
* Other Pipelight-specific enhancements
* Prevent window managers from grouping all wine programs together ([Wine Bug #32699](https://bugs.winehq.org/show_bug.cgi?id=32699))
* ~~Provide named entry point shell32.SHILCreateFromPath for vista apps~~ ([Wine Bug #37265](https://bugs.winehq.org/show_bug.cgi?id=37265))
* Reallocate buffer when adding records to AVI files ([Wine Bug #5137](https://bugs.winehq.org/show_bug.cgi?id=5137))
* ~~Reallocate buffer when adding records to AVI files~~ ([Wine Bug #5137](https://bugs.winehq.org/show_bug.cgi?id=5137))
* Reduced SetTimer minimum value from 10 ms to 5 ms (improves Silverlight framerates)
* Return an error when trying to open a terminated process ([Wine Bug #37087](https://bugs.winehq.org/show_bug.cgi?id=37087))
* Return correct IMediaSeeking stream positions in quartz ([Wine Bug #23174](https://bugs.winehq.org/show_bug.cgi?id=23174))

1
debian/changelog vendored
View File

@ -34,6 +34,7 @@ wine-staging (1.7.34) UNRELEASED; urgency=low
* Removed patch for wine64 support on FreeBSD (accepted upstream).
* Removed patch for IoCsqInitialize (accepted upstream).
* Removed patch to fix invalid usage of RegOpenKeyExW in msdmo (fixed upstream).
* Removed patch to reallocate buffer when adding records to AVI files (fixed upstream).
* Partially removed patches for ntdll DOS attributes (accepted upstream).
* Partially removed patches for UTF7 support (accepted upstream).
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 15 Dec 2014 22:42:09 +0100

View File

@ -24,7 +24,6 @@ PATCHLIST := \
Pipelight.ok \
Staging.ok \
atl-IOCS_Property.ok \
avifil32-Realloc_Records.ok \
comctl32-LoadIconMetric.ok \
configure-Absolute_RPATH.ok \
d3d9-Surface_Refcount.ok \
@ -288,21 +287,6 @@ atl-IOCS_Property.ok:
echo '+ { "Qian Hong", "atl: Don'\''t use GWLP_USERDATA to store IOCS to avoid conflict with Apps.", 1 },'; \
) > atl-IOCS_Property.ok
# Patchset avifil32-Realloc_Records
# |
# | This patchset fixes the following Wine bugs:
# | * [#5137] Reallocate buffer when adding records to AVI files
# |
# | Modified files:
# | * dlls/avifil32/avifile.c
# |
.INTERMEDIATE: avifil32-Realloc_Records.ok
avifil32-Realloc_Records.ok:
$(call APPLY_FILE,avifil32-Realloc_Records/0001-avifil32-Reallocate-buffer-when-adding-records.patch)
@( \
echo '+ { "Sebastian Lackner", "avifil32: Reallocate buffer when adding records.", 1 },'; \
) > avifil32-Realloc_Records.ok
# Patchset comctl32-LoadIconMetric
# |
# | This patchset fixes the following Wine bugs:

View File

@ -1,43 +0,0 @@
From a7766bfbb41580091192539432c9372ceaf41c18 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Fri, 12 Dec 2014 05:48:59 +0100
Subject: avifil32: Reallocate buffer when adding records.
Based on a patch by Bruno Jesus.
---
dlls/avifil32/avifile.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/dlls/avifil32/avifile.c b/dlls/avifil32/avifile.c
index af0315d..c7779c5 100644
--- a/dlls/avifil32/avifile.c
+++ b/dlls/avifil32/avifile.c
@@ -1424,11 +1424,20 @@ static HRESULT AVIFILE_AddRecord(IAVIFileImpl *This)
/* pre-conditions */
assert(This != NULL && This->ppStreams[0] != NULL);
- if (This->idxRecords == NULL || This->cbIdxRecords == 0) {
- This->cbIdxRecords += 1024 * sizeof(AVIINDEXENTRY);
- This->idxRecords = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->cbIdxRecords);
- if (This->idxRecords == NULL)
- return AVIERR_MEMORY;
+ if (This->idxRecords == NULL || This->cbIdxRecords / sizeof(AVIINDEXENTRY) <= This->nIdxRecords) {
+ DWORD new_count = This->cbIdxRecords + 1024 * sizeof(AVIINDEXENTRY);
+ if (!This->idxRecords)
+ {
+ This->idxRecords = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, new_count);
+ if (!This->idxRecords) return AVIERR_MEMORY;
+ }
+ else
+ {
+ void *new_buffer = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, This->idxRecords, new_count);
+ if (!new_buffer) return AVIERR_MEMORY;
+ This->idxRecords = new_buffer;
+ }
+ This->cbIdxRecords = new_count;
}
assert(This->nIdxRecords < This->cbIdxRecords/sizeof(AVIINDEXENTRY));
--
2.1.3

View File

@ -1 +0,0 @@
Fixes: [5137] Reallocate buffer when adding records to AVI files