Re: [exim-dev] 4.80 final?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jeremy Harris
Date:  
À: exim-dev
Sujet: Re: [exim-dev] 4.80 final?
Hi Wolfgang,

On 2012-05-26 10:05, Wolfgang Breyha wrote:
> I had 4.77 running with gnutls but tried 4.80 with openssl 0.9.8x until
> today....
>
> I've built gnutls 2.12.19 from source. I build exim as before. If I try to
> connect with thunderbird from Fedora 16 it fails to connect and exim logs:
> ...(gnutls_handshake): A TLS packet with unexpected length was received.


> Connecting with openssl s_client shows an extensive amount of
> 25626 LOG: MAIN PANIC DIE
> 25626 string_format: unsupported type in "%z" in "tls_do_write(%p, %zu)
> 25626 "
> in exim debug output.


> Am I doing something terrible wrong?


I don't think you are; it looks like SIZE_T_FMT is "zu" on your system;
not unlikely given "man 3 printf" here.... and our debug_printf handling
doesn't understand "z" at all.

Could you try applying this patch and reporting the results?


diff --git a/src/src/string.c b/src/src/string.c
index 08e6045..64daae9 100644
--- a/src/src/string.c
+++ b/src/src/string.c
@@ -1134,7 +1134,7 @@ return yield;
BOOL
string_vformat(uschar *buffer, int buflen, const char *format, va_list ap)
{
-enum { L_NORMAL, L_SHORT, L_LONG, L_LONGLONG, L_LONGDOUBLE };
+enum { L_NORMAL, L_SHORT, L_LONG, L_LONGLONG, L_LONGDOUBLE, L_SIZE };

  BOOL yield = TRUE;
  int width, precision;
@@ -1223,6 +1223,8 @@ while (*fp != 0)
        length = L_LONG;
        }
      }
+  else if (*fp == 'z')
+    { fp++; length = L_SIZE; }


    /* Handle each specific format type. */


@@ -1252,6 +1254,7 @@ while (*fp != 0)
        case L_NORMAL:   sprintf(CS p, newformat, va_arg(ap, int)); break;
        case L_LONG:     sprintf(CS p, newformat, va_arg(ap, long int)); break;
        case L_LONGLONG: sprintf(CS p, newformat, va_arg(ap, LONGLONG_T)); break;
+      case L_SIZE:     sprintf(CS p, newformat, va_arg(ap, size_t)); break;
        }
      while (*p) p++;
      break;




-- 
Cheers,
    Jeremy