Re: OpenDKIM 2.7.1 Solaris 10 compile problems and segfaults

From: Leena Heino <Leena.Heino_at_uta.fi>
Date: Thu, 8 Nov 2012 16:58:13 +0200 (EET)

On Thu, 8 Nov 2012, Murray S. Kucherawy wrote:

> On Thu, 8 Nov 2012, Leena Heino wrote:
>> Attached is a patch that fixes the build with Solaris 10.
>
> The patch contained gibberish. Was it compressed? Can you try again?

The patch was attached as a simple plain text attachment.

I'll send the patch again. If for some reason the attachment will again be
mangled. I include it also here:
--- opendkim-2.7.1.orig/libopendkim/dkim-dns.c 2012-10-25 01:12:31.000000000 +0300
+++ opendkim-2.7.1/libopendkim/dkim-dns.c 2012-11-08 15:03:16.864335102 +0200
_at_@ -57,12 +57,14 @@
  dkim_res_init(void **srv)
  {
  #ifdef HAVE_RES_NINIT
- struct state *res;
+ struct __res_state *res;

- res = malloc(sizeof(struct state));
+ res = (struct __res_state *)malloc(sizeof(struct __res_state));
          if (res == NULL)
                  return -1;

+ memset(res, 0, sizeof(struct __res_state));
+
          if (res_ninit(res) != 0)
          {
                  free(res);
_at_@ -99,13 +101,14 @@
  dkim_res_close(void *srv)
  {
  #ifdef HAVE_RES_NINIT
- struct state *res;
+ struct __res_state *res;

          res = srv;

- res_nclose(res);
-
- free(res);
+ if (res) {
+ res_nclose(res);
+ free(res);
+ }
  #endif /* HAVE_RES_NINIT */
  }


-- 
   Leena Heino              University of Tampere / Computer Centre
   ( liinu at uta.fi )      ( http://www.uta.fi/laitokset/tkk )



Received on Thu Nov 08 2012 - 14:58:24 PST

This archive was generated by hypermail 2.3.0 : Thu Nov 08 2012 - 15:00:02 PST