Steve Greenland a écrit :
> On 01-Apr-08, 04:32 (CDT), "\"Adam C?cile (Le_Vert)\"" <[EMAIL PROTECTED]> 
> wrote: 
>> Hello Steve,
>>
>> This bug report looks serious however I haven't experienced any problem  
>> with python-yenc yet. That's weird.
>> Could you give me a quick code snippet that shows the issue ?
> 
>>>> import yenc
>>>> e = yenc.Encoder()
>>>> e.feed("this is a test")
> 14
>>>> e.getCrc32()
> '0d1ee7ea'
>>>> e.feed("this is a test2")
> 15
>>>> e.getCrc32()
> '-7463fdb3'
> 
> Basically, I just feed data until the CRC goes wonky. It should about
> 50% of the time. The test script doesn't show it because it just
> compares the two wonky CRCs. It only matters if you need the value
> externally. If you have the (signed) integer value, you can get it to
> convert to (python) long via
> 
>       crc32 = crc32 & 0xffffffffL
> 
> which hex() then formats correctly.
> 
> This actually is a problem with all the CRC32 implementations in Python,
> because Python doesn't have an unsigned 32-bit integer.
> 
> Steve
> 

Thanks a lot. I now understand why hellanzb works fine with it and I can
see the bug... It's really strange that nobody had reported it yet!!
If you have some free time, could you please provide a patch so I'll be
able to fix the package quickly ? If not, I'll provide a fix by myself,
when I'll have the time to do.

Thanks in advance,

Best regards, Adam.


Reply via email to