add fix-memory-leak-on-opening-corrupted-files.patch.
This commit is contained in:
parent
e7facd2054
commit
519c27a2bf
21
fix-memory-leak-on-opening-corrupted-files.patch
Normal file
21
fix-memory-leak-on-opening-corrupted-files.patch
Normal file
@ -0,0 +1,21 @@
|
||||
commit cba2f967ebcc7e15d0f33e4219a1e04e2a6fc41e
|
||||
Author: David Bryant <david@wavpack.com>
|
||||
Date: Sun Dec 8 12:06:19 2019 -0800
|
||||
|
||||
fix possible memory leak on opening corrupted files
|
||||
|
||||
diff --git a/src/open_utils.c b/src/open_utils.c
|
||||
index 170c6eb..dfb7cf6 100644
|
||||
--- a/src/open_utils.c
|
||||
+++ b/src/open_utils.c
|
||||
@@ -177,6 +177,11 @@ WavpackContext *WavpackOpenFileInputEx64 (WavpackStreamReader64 *reader, void *w
|
||||
return WavpackCloseFile (wpc);
|
||||
}
|
||||
|
||||
+ if (!wps->wphdr.block_samples) { // free blockbuff if we're going to loop again
|
||||
+ free (wps->blockbuff);
|
||||
+ wps->blockbuff = NULL;
|
||||
+ }
|
||||
+
|
||||
wps->init_done = TRUE;
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user