[LogReport Development] Bug: Integer Overflow causes endless loop
Skora, Thomas
Thomas.Skora at secunet.com
Tue Jul 24 18:57:07 CEST 2007
Hi!
I'm have a problem with Lire 2.0.1 (also with 2.0.2 - mainly the prior
release is used since the distribution supports it) when big transfers
are logged in a squid log file and the subreport "Requests by Size" is
generated. The command I use is:
lr_log2report --output-format xml squid_access squid.log report.xml
When a line with a file transfer bigger than 2^31 bytes is processed by
lire it hangs in the while loop from line 397 (sub create_entry) in
Rangegroup.pm because the variable $value is filled with an negative
value. The error seems to appear somewhere while the function
Lire::SQLExt::LrRangegroup::lr_rangegroup_geo returns its big (>2^32) to
SQLite because the rangegroup column returned by SQLite after the query
contains a negative value.
I thought that was an DBD::SQLite2 issue, but on the test box (64 bit)
example programs simulating such a constellation work fine.
The attached patch moves the problem to some gigabytes above the actual
limit by adding a constant to negative values. It not really fixes the
problem but omits the endless loop for several million log lines. The
patch contains also a second fix for Lire::SQLExt::LrRangegroup where
bad formatted decimal numbers (, instead of . as decimal comma) from
SQLite cause many perl warnings.
Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Lire-2.0.1-1.patch
Type: application/octet-stream
Size: 967 bytes
Desc: Lire-2.0.1-1.patch
Url : http://lists.logreport.org/pipermail/development/attachments/20070724/7f55509a/attachment.obj
More information about the Development
mailing list