[exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Philip Hazel
Fecha:  
A: exim-cvs
Asunto: [exim-cvs] cvs commit: exim/exim-doc/doc-txt ChangeLog exim/exim-src/src expand.c exim/exim-test runtest exim/exim-test/scripts/0000-Basic 0002 exim/exim-test/stdout 0002
ph10 2007/01/08 11:56:42 GMT

  Modified files:
    exim-doc/doc-txt     ChangeLog 
    exim-src/src         expand.c 
    exim-test            runtest 
    exim-test/scripts/0000-Basic 0002 
    exim-test/stdout     0002 
  Log:
  Cast empty string to zero for numerical comparions and treat all numbers
  as decimal.


  Revision  Changes    Path
  1.451     +20 -0     exim/exim-doc/doc-txt/ChangeLog
  1.76      +12 -3     exim/exim-src/src/expand.c
  1.20      +1 -1      exim/exim-test/runtest
  1.9       +6 -0      exim/exim-test/scripts/0000-Basic/0002
  1.9       +6 -0      exim/exim-test/stdout/0002


  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
  retrieving revision 1.450
  retrieving revision 1.451
  diff -u -r1.450 -r1.451
  --- ChangeLog    2 Jan 2007 11:25:00 -0000    1.450
  +++ ChangeLog    8 Jan 2007 11:56:41 -0000    1.451
  @@ -1,7 +1,27 @@
  -$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.450 2007/01/02 11:25:00 ph10 Exp $
  +$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.451 2007/01/08 11:56:41 ph10 Exp $


   Change log file for Exim from version 4.21
   -------------------------------------------
  +
  +Exim version 4.66
  +-----------------
  +
  +PH/01 Two more bugs that were introduced by 4.64/PH/07, in addition to the one
  +      fixed by 4.65/MH/01 (is this a record?) are fixed:
  +
  +      (i)  An empty string was always treated as zero by the numeric comparison
  +           operators. This behaviour has been restored.
  +
  +      (ii) It is documented that the numeric comparison operators always treat
  +           their arguments as decimal numbers. This was broken in that numbers
  +           starting with 0 were being interpreted as octal.
  +
  +      While fixing these problems I realized that there was another issue that
  +      hadn't been noticed. Values of message_size_limit (both the global option
  +      and the transport option) were treated as octal if they started with 0.
  +      The documentation was vague. These values are now always treated as
  +      decimal, and I will make that clear in the documentation.
  +


Exim version 4.65
-----------------

  Index: expand.c
  ===================================================================
  RCS file: /home/cvs/exim/exim-src/src/expand.c,v
  retrieving revision 1.75
  retrieving revision 1.76
  diff -u -r1.75 -r1.76
  --- expand.c    8 Jan 2007 10:50:18 -0000    1.75
  +++ expand.c    8 Jan 2007 11:56:41 -0000    1.76
  @@ -1,4 +1,4 @@
  -/* $Cambridge: exim/exim-src/src/expand.c,v 1.75 2007/01/08 10:50:18 ph10 Exp $ */
  +/* $Cambridge: exim/exim-src/src/expand.c,v 1.76 2007/01/08 11:56:41 ph10 Exp $ */


   /*************************************************
   *     Exim - an Internet mail transport agent    *
  @@ -1988,8 +1988,17 @@


       if (!isalpha(name[0]) && yield != NULL)
         {
  -      num[i] = expand_string_integer(sub[i], FALSE);
  -      if (expand_string_message != NULL) return NULL;
  +      if (sub[i][0] == 0)
  +        {
  +        num[i] = 0;
  +        DEBUG(D_expand)
  +          debug_printf("empty string cast to zero for numerical comparison\n");
  +        }
  +      else
  +        {
  +        num[i] = expand_string_integer(sub[i], FALSE);
  +        if (expand_string_message != NULL) return NULL;
  +        }
         }
       }


@@ -5499,7 +5508,7 @@

   errno = 0;
   expand_string_message = NULL;               /* Indicates no error */
  -value = strtol(CS s, CSS &endptr, 0);
  +value = strtol(CS s, CSS &endptr, 10);


   if (endptr == s)
     {


  Index: runtest
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/runtest,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- runtest    14 Nov 2006 16:40:36 -0000    1.19
  +++ runtest    8 Jan 2007 11:56:41 -0000    1.20
  @@ -1,6 +1,6 @@
   #! /usr/bin/perl -w


-# $Cambridge: exim/exim-test/runtest,v 1.19 2006/11/14 16:40:36 ph10 Exp $
+# $Cambridge: exim/exim-test/runtest,v 1.20 2007/01/08 11:56:41 ph10 Exp $

###############################################################################
# This is the controlling script for the "new" test suite for Exim. It should #
@@ -23,7 +23,7 @@

# Start by initializing some global variables

-$testversion = "4.64 (05-Sep-06)";
+$testversion = "4.66 (08-Jan-07)";

$cf = "bin/cf";
$cr = "\r";

  Index: 0002
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/scripts/0000-Basic/0002,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- 0002    13 Nov 2006 11:26:37 -0000    1.8
  +++ 0002    8 Jan 2007 11:56:41 -0000    1.9
  @@ -237,6 +237,12 @@
   5>3z:   ${if >{5 } {3z }{y}{n}}
   5>a:    ${if >{ 5 } {a}{y}{n}}


  +>0:     ${if > {}{0}{y}{n}}
  +=:      ${if = {}{}{y}{n}}
  +-2<:    ${if < {-2}{}{y}{n}}
  +08>07:  ${if > {08}{07}{y}{n}}
  +011=11: ${if = {011}{11}{y}{n}}
  +
   def:y   ${if def:tod_log{y}{n}}
   def:n   ${if def:host{y}{n}}
   def:f   ${if def:post{y}{n}}


  Index: 0002
  ===================================================================
  RCS file: /home/cvs/exim/exim-test/stdout/0002,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- 0002    13 Nov 2006 11:26:37 -0000    1.8
  +++ 0002    8 Jan 2007 11:56:41 -0000    1.9
  @@ -218,6 +218,12 @@
   > Failed: invalid integer "3z "
   > Failed: integer expected but "a" found

>
  +> >0:     n
  +> =:      y
  +> -2<:    y
  +> 08>07:  y
  +> 011=11: y
  +> 
   > def:y   y
   > def:n   n
   > Failed: unknown variable "post" after "def:"