SHA256
1
0
forked from pool/audacity

Accepting request 81186 from home:mseben:branches:multimedia:apps

added patch audacity-1.3.13-div_by_zero_fix.patch to fix crash

OBS-URL: https://build.opensuse.org/request/show/81186
OBS-URL: https://build.opensuse.org/package/show/multimedia:apps/audacity?expand=0&rev=54
This commit is contained in:
Michal Seben 2011-09-07 08:59:01 +00:00 committed by Git OBS Bridge
parent 83f7a40840
commit 4e06aca227
3 changed files with 91 additions and 0 deletions

View File

@ -0,0 +1,82 @@
--- src/widgets/ProgressDialog.cpp 2011-04-07 01:35:50.000000000 +0200
+++ src/widgets/ProgressDialog.cpp 2011-09-04 21:49:20.956000014 +0200
@@ -1338,7 +1338,14 @@
int
ProgressDialog::Update(wxULongLong_t current, wxULongLong_t total, const wxString & message)
{
- return Update((int)(current * 1000 / total), message);
+ if (total != 0)
+ {
+ return Update((int)(current * 1000 / total), message);
+ }
+ else
+ {
+ return Update(1000, message);
+ }
}
//
@@ -1347,7 +1354,14 @@
int
ProgressDialog::Update(wxLongLong current, wxLongLong total, const wxString & message)
{
- return Update((int)(current.GetValue() * 1000ll / total.GetValue()), message);
+ if (total.GetValue() != 0)
+ {
+ return Update((int)(current.GetValue() * 1000ll / total.GetValue()), message);
+ }
+ else
+ {
+ return Update(1000, message);
+ }
}
//
@@ -1356,7 +1370,14 @@
int
ProgressDialog::Update(wxLongLong_t current, wxLongLong_t total, const wxString & message)
{
- return Update((int)(current * 1000ll / total), message);
+ if (total != 0)
+ {
+ return Update((int)(current * 1000ll / total), message);
+ }
+ else
+ {
+ return Update(1000, message);
+ }
}
//
@@ -1365,7 +1386,14 @@
int
ProgressDialog::Update(int current, int total, const wxString & message)
{
- return Update((int)(current * ((double)(1000.0 / total))), message);
+ if (total != 0)
+ {
+ return Update((int)(current * ((double)(1000.0 / total))), message);
+ }
+ else
+ {
+ return Update(1000, message);
+ }
}
//
@@ -1374,7 +1402,14 @@
int
ProgressDialog::Update(double current, double total, const wxString & message)
{
- return Update((int)(current * 1000.0 / total), message);
+ if (total != 0)
+ {
+ return Update((int)(current * 1000.0 / total), message);
+ }
+ else
+ {
+ return Update(1000, message);
+ }
}
//

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Sep 7 07:36:18 UTC 2011 - mseben@gmail.com
- added audacity-1.3.13-div_by_zero_fix.patch to fix audacity crash
while opening invalid wav file (bnc#711737)
-------------------------------------------------------------------
Fri Aug 19 19:47:51 UTC 2011 - reddwarf@opensuse.org

View File

@ -64,6 +64,8 @@ Source1: %{name}.png
Source2: %{name}-license-nyquist
# PATCH-FIX-OPENSUSE %{name}-no_buildstamp.patch reddwarf@opensuse.org -- this patch removes the buildstamp
Patch0: %{name}-no_buildstamp.patch
# PATCH-FIX-UPSTREAM %{name}-1.3.13-div_by_zero_fix.patch mseben@gmail.com -- fix crash (bnc#711737), fix already in upstream svn
Patch1: %{name}-1.3.13-div_by_zero_fix.patch
Patch16: %{name}-implicit.patch
# PATCH-FIX-UPSTREAM %{name}-1.3.13-ffmpeg.patch reddwarf@opensuse.org -- make it compile against latest ffmpeg
Patch17: %{name}-1.3.13-ffmpeg.patch
@ -83,6 +85,7 @@ physical memory size of your computer.
%prep
%setup -q -n %{name}-src-%{version}-beta
%patch0
%patch1
%patch16
%if %{with ffmpeg}
%patch17 -p1