Skip to content

Commit

Permalink
SimpleModule: set output chunk framecount after pull
Browse files Browse the repository at this point in the history
After pulling the data, set the output chunk to the amount of
frames we pulled so that the next module in the chain has the correct
frame count.

Fixes mpruett#50 and mpruett#51
  • Loading branch information
wtay authored and sbaldovi committed May 30, 2023
1 parent aeeb0cf commit 2f4e470
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions libaudiofile/modules/SimpleModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
void SimpleModule::runPull()
{
pull(m_outChunk->frameCount);
m_outChunk->frameCount = m_inChunk->frameCount;
run(*m_inChunk, *m_outChunk);
}

Expand Down
26 changes: 26 additions & 0 deletions patches/12_CVE-2018-17095.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 822b732fd31ffcb78f6920001e9b1fbd815fa712 Mon Sep 17 00:00:00 2001
From: Wim Taymans <[email protected]>
Date: Thu, 27 Sep 2018 12:11:12 +0200
Subject: [PATCH] SimpleModule: set output chunk framecount after pull

After pulling the data, set the output chunk to the amount of
frames we pulled so that the next module in the chain has the correct
frame count.

Fixes #50 and #51
---
libaudiofile/modules/SimpleModule.cpp | 1 +
1 file changed, 1 insertion(+)

diff --git a/libaudiofile/modules/SimpleModule.cpp b/libaudiofile/modules/SimpleModule.cpp
index 2bae1eb..e87932c 100644
--- a/libaudiofile/modules/SimpleModule.cpp
+++ b/libaudiofile/modules/SimpleModule.cpp
@@ -26,6 +26,7 @@
void SimpleModule::runPull()
{
pull(m_outChunk->frameCount);
+ m_outChunk->frameCount = m_inChunk->frameCount;
run(*m_inChunk, *m_outChunk);
}

0 comments on commit 2f4e470

Please sign in to comment.