diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-29 15:54:12 +0200 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2015-09-29 15:55:10 +0200 |
commit | 48cf8ee4d00068967848c3c9deb33b6c996c1697 (patch) | |
tree | b03ab4033e600781d81ccb4cd58e76b4c5e23f07 /main | |
parent | 97f57dcaeb821475a6ea29a9c805df706f015225 (diff) | |
download | aports-48cf8ee4d00068967848c3c9deb33b6c996c1697.tar.bz2 aports-48cf8ee4d00068967848c3c9deb33b6c996c1697.tar.xz |
main/oscam: fix segfault due to fclose(0)
http://www.streamboard.tv/oscam/changeset/11019/
Diffstat (limited to 'main')
-rw-r--r-- | main/oscam/APKBUILD | 6 | ||||
-rw-r--r-- | main/oscam/fclose.patch | 29 |
2 files changed, 34 insertions, 1 deletions
diff --git a/main/oscam/APKBUILD b/main/oscam/APKBUILD index bbcb9a7010..48f54cb68a 100644 --- a/main/oscam/APKBUILD +++ b/main/oscam/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Carlo Landmeter <clandmeter@gmail.com> pkgname=oscam pkgver=0_svn20150922 -pkgrel=0 +pkgrel=1 pkgdesc="An Open Source Conditional Access Module software" url="http://www.streamboard.tv/oscam/" arch="all" @@ -16,6 +16,7 @@ subpackages="$pkgname-doc $pkgname-list-smargo:list_smargo $pkgname-dbg" svnurl="http://www.streamboard.tv/svn/oscam/trunk" disturl="dev.alpinelinux.org:/archive/$pkgname/" source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$pkgver.tar.gz + fclose.patch $pkgname.initd $pkgname.confd $pkgname.conf" @@ -91,14 +92,17 @@ dbg() { } md5sums="50ba634b00b311afc5f13d0ca33e8650 oscam-0_svn20150922.tar.gz +29ac4c29c0985ec8b0b86580b4b9e556 fclose.patch 69173e0e5cb8f9e5ce2c39913507ccbb oscam.initd 3108b2f38140b5791d15cf49dae4ad35 oscam.confd 90939047384482ba8d4428b127b53785 oscam.conf" sha256sums="80d2a7828c0c2625718afcf34dc1bfe36c93343c5256390afe6aa2e90fde3e79 oscam-0_svn20150922.tar.gz +2f5490c7b74527c79f817d49651523c0bd55a8d9961238d21d314eb23634e1f5 fclose.patch 7d7e0d75ce5cf6bc79887081175427419867f223ccabcd6e1005cb7c4d161fcd oscam.initd dd66db5c280ea6c695b55aafb972c3713e297c7ff47deff9f15f40e9c080f3fd oscam.confd 7a2e4cb5da504027b858086966eee57fcc1cc14115a7978997857e631e459b6e oscam.conf" sha512sums="af5fbca4571c1bd050cc6fadd484af3008eaea2d490ac2a2326ff8a1147c710cb44eb5a5c02fa90ea8877b705356658f675ab48207c590687326512108771c13 oscam-0_svn20150922.tar.gz +e71605e9806de8fe0aace88acf4fb2b595c79764af7eb3855735fa2333adb63e5cec67a26bc30e66a62b9d603978fe8d0c49fc4903c4dc9a1a298b57a4e51e34 fclose.patch 3c5f4a5ec5c00edc2452203b2fa09e98e3576a6ead815779a8ce53bfeede520302d808d82e93994f24d58cd463e5b007a36f0804738595078fe7dec4e2fe46be oscam.initd 73998e9b9212c4868284aa4ed7d3a53fb61c087658f6dd8615de331fe12e1a9a1ea8941ebcc880804579d161d7954ead098315130cd07fc0fb2b368475f74e96 oscam.confd 0f3c4b9940bd27169dfe934599525558bc712d43f07959f19dce6ccfbf0e4d35d345272500fba2bff30e4ecf23f11f72b75321f8a45df908373620349d7f8808 oscam.conf" diff --git a/main/oscam/fclose.patch b/main/oscam/fclose.patch new file mode 100644 index 0000000000..145c35d312 --- /dev/null +++ b/main/oscam/fclose.patch @@ -0,0 +1,29 @@ +Index: /trunk/oscam-conf.c
+===================================================================
+--- trunk/oscam-conf.c (revision 11018)
++++ trunk/oscam-conf.c (revision 11019)
+@@ -525,5 +525,8 @@
+ strncat(tmp_file, ".tmp", sizeof(tmp_file) - strlen(tmp_file) - 1);
+ strncat(bak_file, ".bak", sizeof(bak_file) - strlen(bak_file) - 1);
+- fclose(f);
++ if(f)
++ {
++ fclose(f);
++ }
+ return safe_overwrite_with_bak(dst_file, tmp_file, bak_file, cfg.http_overwrite_bak_file);
+ }
+Index: /trunk/oscam-config.c
+===================================================================
+--- trunk/oscam-config.c (revision 11018)
++++ trunk/oscam-config.c (revision 11019)
+@@ -436,5 +436,9 @@
+ {
+ fp = create_config_file("oscam.srvid2");
+- flush_config_file(fp, "oscam.srvid2");
++ if(fp)
++ {
++ flush_config_file(fp, "oscam.srvid2");
++ }
++
+ return 0;
+ }
|