Skip to Content.
Sympa Menu

devel - [sympa-dev] parser.pl bug with urlize_part

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Sergiy Zhuk <address@concealed>
  • To: address@concealed
  • Subject: [sympa-dev] parser.pl bug with urlize_part
  • Date: Sat, 25 Feb 2006 02:09:29 -0800 (PST)

hi

I was looking at why sympa.pl dies with "Out of memory!" error when someone
is trying to use urlize mode on a certain type of multipart messages.
It turnes out to be a bug in parser.pl, which is using "sprinf $_" to append
data to an array if it's passed, e.g.:

if (ref($current_output) eq 'ARRAY') {
push @{$current_output}, sprintf $_;

While this works for some cases, it doesn't work with URLs which contain
html-escaped chars (e.g. you get %<char>), which sprintf treats as a part of
format
string producing all kind of errors.

Franky, I don't undestand why sprintf has been used there at all since if
you're
passing a file (not an array) to parse_tpl, a plain "print" is used, meaning
you're
not really using the format string or expand anything using sprintf.
I've simply dropped sprintf evewhere (3 places in parser.pl) replacing it
with
push @{$current_output},$_;
and everything is working fine now.

thanks

--
rgds,
serge


  • [sympa-dev] parser.pl bug with urlize_part, Sergiy Zhuk, 02/25/2006

Archive powered by MHonArc 2.6.19+.

Top of Page