New 2.5.1 release
This commit is contained in:
parent
1bc4210f1e
commit
167d48b6f3
@ -1,34 +0,0 @@
|
|||||||
From 93686f8ba8c1ed6bf559dbfda53f9c7d702c76b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
||||||
Date: Thu, 21 Jul 2016 18:13:58 +0200
|
|
||||||
Subject: [PATCH] usb_modeswitch: don't return a value from stack
|
|
||||||
|
|
||||||
The memory is not allocated anymore when the function returns and that
|
|
||||||
causes no end of mayhem and undefined behavior.
|
|
||||||
|
|
||||||
Let's make it static so that it's perserved after the return. It wastes
|
|
||||||
LINE_DIM bytes of memory and requires the caller to consume the value
|
|
||||||
before another call, but that's no problem.
|
|
||||||
|
|
||||||
http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2557
|
|
||||||
---
|
|
||||||
usb_modeswitch.c | 3 ++-
|
|
||||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/usb_modeswitch.c b/usb_modeswitch.c
|
|
||||||
index f9c8b2e..3373ccf 100644
|
|
||||||
--- a/usb_modeswitch.c
|
|
||||||
+++ b/usb_modeswitch.c
|
|
||||||
@@ -1855,7 +1855,8 @@ char* ReadParseParam(const char* FileName, char *VariableName)
|
|
||||||
char *FirstQuote, *LastQuote, *P1, *P2;
|
|
||||||
int Line=0;
|
|
||||||
unsigned Len=0, Pos=0;
|
|
||||||
- char Str[LINE_DIM], *token, *configPos;
|
|
||||||
+ static char Str[LINE_DIM];
|
|
||||||
+ char *token, *configPos;
|
|
||||||
FILE *file = NULL;
|
|
||||||
|
|
||||||
// Reading and storing input during the first call
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
26
0001-usb_modeswitch-fix-a-wrong-comparison.patch
Normal file
26
0001-usb_modeswitch-fix-a-wrong-comparison.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From bcb5b8702adbf568598988fccf256586b5788fcb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
Date: Fri, 18 Aug 2017 10:37:15 +0200
|
||||||
|
Subject: [PATCH 1/2] usb_modeswitch: fix a wrong comparison
|
||||||
|
|
||||||
|
The char pointer should be dereferences when checking the string is empty.
|
||||||
|
---
|
||||||
|
usb_modeswitch.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/usb_modeswitch.c b/usb_modeswitch.c
|
||||||
|
index b2b930b..6948a84 100644
|
||||||
|
--- a/usb_modeswitch.c
|
||||||
|
+++ b/usb_modeswitch.c
|
||||||
|
@@ -1707,7 +1707,7 @@ struct libusb_device* search_devices( int *numFound, int vendor, char* productLi
|
||||||
|
*numFound = 0;
|
||||||
|
|
||||||
|
/* Sanity check */
|
||||||
|
- if (!vendor || productList == '\0')
|
||||||
|
+ if (!vendor || *productList == '\0')
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
listcopy = malloc(strlen(productList)+1);
|
||||||
|
--
|
||||||
|
2.13.0
|
||||||
|
|
26
0002-usb_modeswitch-count-the-target-devices-from-zero.patch
Normal file
26
0002-usb_modeswitch-count-the-target-devices-from-zero.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
From 9d05fe0e0f6b049520d97a47d042d5cfad35b5d6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Lubomir Rintel <lkundrak@v3.sk>
|
||||||
|
Date: Fri, 18 Aug 2017 10:40:41 +0200
|
||||||
|
Subject: [PATCH 2/2] usb_modeswitch: count the target devices from zero
|
||||||
|
|
||||||
|
Most likely a typo here.
|
||||||
|
---
|
||||||
|
usb_modeswitch.c | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/usb_modeswitch.c b/usb_modeswitch.c
|
||||||
|
index 6948a84..4a1fb5c 100644
|
||||||
|
--- a/usb_modeswitch.c
|
||||||
|
+++ b/usb_modeswitch.c
|
||||||
|
@@ -1579,7 +1579,7 @@ int checkSuccess()
|
||||||
|
* Target device on the same bus with higher device number is returned,
|
||||||
|
* description is read for syslog message
|
||||||
|
*/
|
||||||
|
- for (i=i; i < CheckSuccess; i++) {
|
||||||
|
+ for (i=0; i < CheckSuccess; i++) {
|
||||||
|
SHOW_PROGRESS(output," Search for target devices ...\n");
|
||||||
|
dev = search_devices(&newTargetCount, TargetVendor, TargetProductList,
|
||||||
|
TargetClass, 0, SEARCH_TARGET);
|
||||||
|
--
|
||||||
|
2.13.0
|
||||||
|
|
2
sources
2
sources
@ -1 +1 @@
|
|||||||
6e1640db47768bb9012f91b7593116ef usb-modeswitch-2.4.0.tar.bz2
|
SHA512 (usb-modeswitch-2.5.1.tar.bz2) = 23f1866cbb5882280369362f6d3e01d991136f322284d3f343da132520569f9e303cd9c4368a71893a3d959bae6bde2d4325f6dc175a1cb2d4dd5faa61add6ab
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
%define source_name usb-modeswitch
|
%define source_name usb-modeswitch
|
||||||
|
|
||||||
Name: usb_modeswitch
|
Name: usb_modeswitch
|
||||||
Version: 2.4.0
|
Version: 2.5.1
|
||||||
Release: 8%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: USB Modeswitch gets mobile broadband cards in operational mode
|
Summary: USB Modeswitch gets mobile broadband cards in operational mode
|
||||||
Summary(de): USB Modeswitch aktiviert UMTS-Karten
|
Summary(de): USB Modeswitch aktiviert UMTS-Karten
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
@ -18,8 +18,10 @@ Patch0: rhbz948451-fix-manual-pages.patch
|
|||||||
Patch1: device_reference-utf8.patch
|
Patch1: device_reference-utf8.patch
|
||||||
# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2556
|
# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2556
|
||||||
Patch2: 0001-Fix-crash-on-early-fail.patch
|
Patch2: 0001-Fix-crash-on-early-fail.patch
|
||||||
# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2557
|
# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2732
|
||||||
Patch3: 0001-usb_modeswitch-don-t-return-a-value-from-stack.patch
|
Patch3: 0001-usb_modeswitch-fix-a-wrong-comparison.patch
|
||||||
|
# http://www.draisberghof.de/usb_modeswitch/bb/viewtopic.php?f=2&t=2733
|
||||||
|
Patch4: 0002-usb_modeswitch-count-the-target-devices-from-zero.patch
|
||||||
|
|
||||||
BuildRequires: libusbx-devel
|
BuildRequires: libusbx-devel
|
||||||
BuildRequires: jimtcl-devel
|
BuildRequires: jimtcl-devel
|
||||||
@ -48,7 +50,8 @@ cp -f %{SOURCE1} device_reference.txt
|
|||||||
%patch0 -p1 -b .manpage
|
%patch0 -p1 -b .manpage
|
||||||
%patch1 -p0 -b .utf8
|
%patch1 -p0 -b .utf8
|
||||||
%patch2 -p1 -b .libusb_exit
|
%patch2 -p1 -b .libusb_exit
|
||||||
%patch3 -p1 -b .stack
|
%patch3 -p1 -b .char_deref
|
||||||
|
%patch4 -p1 -b .zero_iter
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -75,6 +78,9 @@ make install \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Aug 18 2017 Lubomir Rintel <lkundrak@v3.sk> - 2.5.1-1
|
||||||
|
- New 2.5.1 release
|
||||||
|
|
||||||
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-8
|
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-8
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user