Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 10 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
10 magnus 1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 22_spfquery_fallback_segfault.dpatch by Robert Millan <rmh@aybabtu.com>
3
##
4
## All lines beginning with `## DP:' are a description of the patch.
5
## DP: Fix segfault with malformed -guess argument
6
 
7
@DPATCH@
8
 
9
diff -ur libspf2-1.2.5.dfsg.old/src/spfquery/spfquery.c libspf2-1.2.5.dfsg/src/spfquery/spfquery.c
10
--- libspf2-1.2.5.dfsg.old/src/spfquery/spfquery.c	2005-02-22 03:36:55.000000000 +0100
11
+++ libspf2-1.2.5.dfsg/src/spfquery/spfquery.c	2007-06-24 13:17:34.000000000 +0200
12
@@ -341,6 +341,7 @@
13
 	SPF_request_t	*spf_request = NULL;
14
 	SPF_response_t	*spf_response = NULL;
15
 	SPF_response_t	*spf_response_2mx = NULL;
16
+	SPF_response_t	*spf_response_fallback = NULL;
17
 	SPF_errcode_t	 err;
18
 
19
 	char			*opt_file = NULL;
20
@@ -670,20 +671,20 @@
21
 		/* We now have an option to call SPF_request_query_fallback */
22
 		if (opts->fallback) {
23
 			err = SPF_request_query_fallback(spf_request,
24
-							&spf_response, opts->fallback);
25
+							&spf_response_fallback, opts->fallback);
26
 			if (opts->debug)
27
-				response_print("fallback query", spf_response_2mx);
28
+				response_print("fallback query", spf_response_fallback);
29
 			if (err) {
30
 				response_print_errors("Failed to query best-guess",
31
-								spf_response, err);
32
+								spf_response_fallback, err);
33
 				CONTINUE_ERROR;
34
 			}
35
 
36
 			/* append the result */
37
-			APPEND_RESULT(SPF_response_result(spf_response_2mx));
38
+			APPEND_RESULT(SPF_response_result(spf_response_fallback));
39
 
40
 			spf_response = SPF_response_combine(spf_response,
41
-							spf_response_2mx);
42
+							spf_response_fallback);
43
 		}
44
 
45
 		printf( "%s\n%s\n%s\n%s\n",