[SCM] mustang-plug/master: Moved fopen() in update function so that file is opened after all necessary checks.
alessio at users.alioth.debian.org
alessio at users.alioth.debian.org
Thu Jul 10 10:33:40 UTC 2014
The following commit has been merged in the master branch:
commit c83cebbe4e5d1c61e71d50b4e622d76afcd3146e
Author: Alessio Treglia <alessio at debian.org>
Date: Thu Jul 10 11:27:40 2014 +0100
Moved fopen() in update function so that file is opened after all necessary checks.
diff --git a/debian/patches/1003-upstream_bug_31.patch b/debian/patches/1003-upstream_bug_31.patch
new file mode 100644
index 0000000..368aaef
--- /dev/null
+++ b/debian/patches/1003-upstream_bug_31.patch
@@ -0,0 +1,25 @@
+Descriptiption: Moved fopen() in update function so that file is
+ opened after all necessary checks - fixes #31
+Origin: upstream, http://code.piorekf.org/plug/commits/1b82b066239
+---
+ plug/mustang.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- mustang-plug.orig/plug/mustang.cpp
++++ mustang-plug/plug/mustang.cpp
+@@ -1274,7 +1274,6 @@ int Mustang::update(char *filename)
+ int ret, recieved;
+ unsigned char array[LENGTH], number = 0;
+ FILE *file;
+- file = fopen(filename, "rb");
+ // struct timespec sleep;
+ // sleep.tv_nsec = NANO_SEC_SLEEP;
+ // sleep.tv_sec = 0;
+@@ -1321,6 +1320,7 @@ int Mustang::update(char *filename)
+ else
+ return -200;
+
++ file = fopen(filename, "rb");
+ // send date when firmware was created
+ fseek(file, 0x1a, SEEK_SET);
+ memset(array, 0x00, LENGTH);
diff --git a/debian/patches/series b/debian/patches/series
index 516d4c2..b9e6f33 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
1001-firmware_mustange_III_to_V.patch
1002-firmware_mustang_II_v2.patch
+1003-upstream_bug_31.patch
--
mustang-plug packaging
More information about the pkg-multimedia-commits
mailing list