httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apache-1.3/src/modules/standard mod_rewrite.c
Date Sat, 16 Mar 2002 23:44:21 GMT
wrowe       02/03/16 15:44:21

  Modified:    src/modules/standard mod_rewrite.c
  Log:
    Resolve bugs introduced by my Rev 1.173, which attempted to close
    a type mismatch error.  This truncation should now produce a random
    result, once again.  PR 10090, 10185
  
    Bug pinpointed by Jeroen Boomgaardt <jeroen@swissclue.com>
  
  Revision  Changes    Path
  1.175     +1 -1      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.174
  retrieving revision 1.175
  diff -u -r1.174 -r1.175
  --- mod_rewrite.c	13 Mar 2002 21:05:34 -0000	1.174
  +++ mod_rewrite.c	16 Mar 2002 23:44:20 -0000	1.175
  @@ -3013,7 +3013,7 @@
        * result. Doing an integer modulus would only use the lower-order bits
        * which may not be as uniformly random.
        */
  -    return (int)((double)(rand() % RAND_MAX) / RAND_MAX) * (h - l + 1) + l;
  +    return (int)(((double)(rand() % RAND_MAX) / RAND_MAX) * (h - l + 1) + l);
   }
   
   static char *select_random_value_part(request_rec *r, char *value)
  
  
  

Mime
View raw message