Fix buffer overrun in spam= acl condition. Bug 1552
[exim.git] / src / src / transport.c
index d222adce868e8d240e59cb742a4f1dead4f63d21..e833894a81f744b5161bf93ae1599bd5e9d97ef4 100644 (file)
@@ -66,6 +66,10 @@ optionlist optionlist_transports[] = {
                  (void *)offsetof(transport_instance, driver_name) },
   { "envelope_to_add",   opt_bool|opt_public,
                  (void *)(offsetof(transport_instance, envelope_to_add)) },
+#ifdef EXPERIMENTAL_EVENT
+  { "event_action",     opt_stringptr | opt_public,
+                 (void *)offsetof(transport_instance, event_action) },
+#endif
   { "group",             opt_expand_gid|opt_public,
                  (void *)offsetof(transport_instance, gid) },
   { "headers_add",      opt_stringptr|opt_public|opt_rep_str,
@@ -94,10 +98,6 @@ optionlist optionlist_transports[] = {
                  (void *)offsetof(transport_instance, shadow_condition) },
   { "shadow_transport", opt_stringptr|opt_public,
                  (void *)offsetof(transport_instance, shadow) },
-#ifdef EXPERIMENTAL_TPDA
-  { "tpda_delivery_action",opt_stringptr | opt_public,
-                 (void *)offsetof(transport_instance, tpda_delivery_action) },
-#endif
   { "transport_filter", opt_stringptr|opt_public,
                  (void *)offsetof(transport_instance, filter_command) },
   { "transport_filter_timeout", opt_time|opt_public,
@@ -643,8 +643,7 @@ for (h = header_list; h != NULL; h = h->next) if (h->type != htype_old)
       {
       int sep = ':';         /* This is specified as a colon-separated list */
       uschar *s, *ss;
-      uschar buffer[128];
-      while ((s = string_nextinlist(&list, &sep, buffer, sizeof(buffer))))
+      while ((s = string_nextinlist(&list, &sep, NULL, 0)))
        {
        int len;
 
@@ -1068,7 +1067,7 @@ if (dkim_private_key && dkim_domain && dkim_selector)
       uschar *dkim_strict_result = expand_string(dkim_strict);
       if (dkim_strict_result)
        if ( (strcmpic(dkim_strict,US"1") == 0) ||
-            (strcmpic(dkim_strict,US"true") == 0) )
+            (strcmpic(dkim_strict,US"true") == 0) ) 
          {
          /* Set errno to something halfway meaningful */
          save_errno = EACCES;
@@ -1104,8 +1103,8 @@ if (dkim_private_key && dkim_domain && dkim_selector)
     }
   }
 
-  /* Fetch file positition (the size) */
-  size = lseek(dkim_fd,0,SEEK_CUR);
+/* Fetch file size */
+size = lseek(dkim_fd, 0, SEEK_END);
 
 /* Rewind file */
 lseek(dkim_fd, 0, SEEK_SET);