Comment 0 for bug 1093446

Revision history for this message
Andrew Cooke (ato2gx513oupn-andrew-n1by9anq91ai4) wrote : allow_wraparound misleadingly documented

The documentation for Counter says:

allow_wraparound (boolean) - If True, the function will raise an OverflowError exception as soon as the counter wraps around. If False (default), the counter will simply restart from zero.

which is confusing as all heck. If the text is correct then setting this to true (ie setting ALLOW to TRUE) then wraparound is DISALLOWED. The implementation is at the C level so I haven't looked or tested, but at the moment it's not clear if the docs are plain wrong the naming of the parameter is just monumentally dumb.

Marking this as a security vulnerability because if you get wraparound when you're not expecting it you could have duplicate streams.