View Issue Details

IDProjectCategoryView StatusLast Update
0002963unrealircdpublic2006-12-28 12:27
ReporterTrocotronic Assigned ToTrocotronic  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformAMD K6 32bitsOSWindows XP ProfessionalOS VersionSP2
Product Version3.2.5 
Fixed in Version3.3-alpha0 
Summary0002963: CRC32 is wrong
DescriptionCRC32 does not return de correct value as rfc says.
  unsigned long crc32val;
  
  crc32val = 0;
  for (i = 0; i < len; i ++)
    {
      crc32val =
        crc32_tab[(crc32val ^ s[i]) & 0xff] ^
          (crc32val >> 8);
    }
  return crc32val;

would be

  unsigned long crc32val;
  
  crc32val = 0xffffffffL;
  for (i = 0; i < len; i ++)
    {
      crc32val =
        crc32_tab[(crc32val ^ s[i]) & 0xff] ^
          (crc32val >> 8);
    }
  crc32val ^= 0xffffffffL;
  return crc32val;

I know that is not a big deal, but I have some troubles with my modules for it (I had headache for two days).
Steps To ReproduceCompare two strings, one got by unreal's crc32 and the other by php's crc32(), mirc's $crc(), etc. Both are different.
TagsNo tags attached.
3rd party modules

Activities

syzop

2006-08-29 07:27

administrator   ~0012261

[20:04:38] <Syzop> bug 0002963 is about "crc32 is wrong"
[20:04:46] <Syzop> what we should actually do is rip out crc32 completely
[20:04:57] <Syzop> (it was for old cloaking)
[20:05:19] <Syzop> and replace a couple of calls to it (by the randomness system).. simply make that use md5 instead.

This is for 3.3*.

Just leave the 3.2* code alone for compatability / not annoying people using alternative crc32 modules too much (not that I care much, but.. just do it in 3.3* ;p).

Trocotronic

2006-12-28 12:27

reporter   ~0012943

Fixed in .2320

Issue History

Date Modified Username Field Change
2006-06-08 08:47 Trocotronic New Issue
2006-08-29 07:27 syzop Note Added: 0012261
2006-08-29 07:27 syzop Status new => acknowledged
2006-12-28 12:27 Trocotronic Status acknowledged => resolved
2006-12-28 12:27 Trocotronic Fixed in Version => 3.3-alpha0
2006-12-28 12:27 Trocotronic Resolution open => fixed
2006-12-28 12:27 Trocotronic Assigned To => Trocotronic
2006-12-28 12:27 Trocotronic Note Added: 0012943