Bug Tracker item #2943438, was opened at 2010-02-01 00:48
Message generated for change (Tracker Item Submitted) made by ensc
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2943438&group_id=250683

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: daemon
Group: v3.9.0
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Enrico Scholz (ensc)
Assigned to: Nobody/Anonymous (nobody)
Summary: cssclean corrupts hashfile

Initial Comment:
cssclean.c makes

|    hash_rec_max = strtol(READ_ATTRIB("HashRecMax"), NULL, 0);
|
|  if (_hash_drv_open(filename, &old, 0, max_seek,
|                     max_extents, extent_size, pctincrease, flags))
|  ...
|  if (_hash_drv_open(newfile, &new, hash_rec_max, max_seek,
|                     max_extents, extent_size, pctincrease, flags)) {
|  ...
|  /* preserve counters */
|  memcpy(new.header, old.header, sizeof(*new.header));


This causes errors (e.g. a floating point exception due to division
by zero) or data corruption when the old file has a hash-rec size
(old.header.hash_rec_max) which is different from the configured one.

Such a situation happens e.g. when configuration has been changed or
'csscompress' has been run over the file.

Then, the hash-driver will work with 'hash_rec_max' some time but
when closing the file, the hash_rec_max value of the old file will be
written and subsequent operate on wrong hash divider and calculate
wrong offset of next extent.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=1126467&aid=2943438&group_id=250683

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Dspam-devel mailing list
Dspam-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspam-devel

Reply via email to