Package: conky / 1.9.0-6

fix-curl-related-crashes.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Fix curl related crashes
 curl implements some of the timeouts using alarm(), where the alarm handler
 longjmp()s back into the curl code. This is a bad idea in multi-threaded
 applications, since it is not guaranteed that SIGALARM will be recieved by the
 correct thread. Therefore, we instruct curl to avoid using signals.
Origin: upstream, http://git.omp.am/?p=conky.git;a=patch;h=cbc131ea6c601beecb40439eb86f7e6d48b72167
Bug: http://sourceforge.net/support/tracker.php?aid=3582149
Bug-Debian: http://bugs.debian.org/623106
Bug-Ubuntu: https://bugs.launchpad.net/bugs/780741
Bug-Ubuntu: https://bugs.launchpad.net/bugs/1154741

--- a/src/ccurl_thread.c
+++ b/src/ccurl_thread.c
@@ -168,6 +168,9 @@
 		curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, 1000);
 		curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, 60);
 
+		// curl's usage of alarm()+longjmp() is a really bad idea for multi-threaded applications
+		curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1);
+
 		if (curloc->last_modified) {
 			const char *header = "If-Modified-Since: ";
 			int len = strlen(header) + strlen(curloc->last_modified) + 1;