Subversion Repositories

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

Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#! /bin/sh /usr/share/dpatch/dpatch-run
## 22_spfquery_fallback_segfault.dpatch by Robert Millan <rmh@aybabtu.com>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix segfault with malformed -guess argument

@DPATCH@

diff -ur libspf2-1.2.5.dfsg.old/src/spfquery/spfquery.c libspf2-1.2.5.dfsg/src/spfquery/spfquery.c
--- libspf2-1.2.5.dfsg.old/src/spfquery/spfquery.c      2005-02-22 03:36:55.000000000 +0100
+++ libspf2-1.2.5.dfsg/src/spfquery/spfquery.c  2007-06-24 13:17:34.000000000 +0200
@@ -341,6 +341,7 @@
        SPF_request_t   *spf_request = NULL;
        SPF_response_t  *spf_response = NULL;
        SPF_response_t  *spf_response_2mx = NULL;
+       SPF_response_t  *spf_response_fallback = NULL;
        SPF_errcode_t    err;
 
        char                    *opt_file = NULL;
@@ -670,20 +671,20 @@
                /* We now have an option to call SPF_request_query_fallback */
                if (opts->fallback) {
                        err = SPF_request_query_fallback(spf_request,
-                                                       &spf_response, opts->fallback);
+                                                       &spf_response_fallback, opts->fallback);
                        if (opts->debug)
-                               response_print("fallback query", spf_response_2mx);
+                               response_print("fallback query", spf_response_fallback);
                        if (err) {
                                response_print_errors("Failed to query best-guess",
-                                                               spf_response, err);
+                                                               spf_response_fallback, err);
                                CONTINUE_ERROR;
                        }
 
                        /* append the result */
-                       APPEND_RESULT(SPF_response_result(spf_response_2mx));
+                       APPEND_RESULT(SPF_response_result(spf_response_fallback));
 
                        spf_response = SPF_response_combine(spf_response,
-                                                       spf_response_2mx);
+                                                       spf_response_fallback);
                }
 
                printf( "%s\n%s\n%s\n%s\n",