httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <hart...@hyperreal.com>
Subject WWW Form Bug Report: "buggy perl code in dbmmanage.new - randomchar" on BSDI (fwd)
Date Sat, 09 Dec 1995 21:15:39 GMT

no ack sent.

Brian, is this yours?

Forwarded message:
> From nobody@hyperreal.com  Fri Dec  8 19:38:16 1995
> Message-Id: <199512090338.TAA27793@taz.hyperreal.com>
> From: nat@vivid.com
> To: apache-bugs%apache.org@organic.com
> Date: Fri Dec  8 19:38:14 1995
> Subject: WWW Form Bug Report: "buggy perl code in dbmmanage.new - randomchar" on BSDI
> 
> Submitter: nat@vivid.com
> Operating system: BSDI, version: 
> Extra Modules used: 
> URL exhibiting problem: 
> 
> Symptoms:
> --
> The "experimental" perl support script 
> dbmmanage.new has a minor bug in it, in
> the randomchar subroutine.
> 
> A 64 character string is being referenced by:
> 
> $str .= substr($enc,int(rand(64))+1,1);
> 
> which generates a number from 1 to 64, when 
> actually we want a number from 0 to 63.  
> 
> This very minor bug causes the function to 
> sometimes (1 in 64 times approximately) return 
> null instead of a random character, and never 
> return '.', which is the first string element.
> 
> the line to fix this is:
> $str .= substr($enc,int(rand(64)),1);
> 
> Like I said, very minor, but I thought 
> I'd mention it.
> 
> Hope this helps! 
> 
> -Nat
> --
> 
> Backtrace:
> --
> 
> --
> 


Mime
View raw message