in reply to Re: Another day, another Tk question
in thread Taint error with Tk
The code to get $height and $width is:
sub getfilesize{ my @spec=(); open FH, $file; for (0..9){$spec[$_] = getc(FH);} close FH; my $tmp1 = unpack("H2",$spec[7]).unpack("H2",$spec[6]); my $tmp2 = unpack("H2",$spec[9]).unpack("H2",$spec[8]); $width = unpack('s',pack('s',hex($tmp2))); $height = unpack('s',pack('s',hex($tmp1))); }
I know it's a bit screwy, but I just need to get the filesize out of a gif, no other format, so I thought writing the quick bit would be easier than plugging in a whole module.
Given that, can you tell me why it's tainted? I'm lost on that one.
Thanks!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Another day, another Tk question
by IlyaM (Parson) on Apr 29, 2002 at 22:41 UTC | |
|
Re: Re: Re: Another day, another Tk question
by samtregar (Abbot) on Apr 29, 2002 at 22:37 UTC |