wtetzner / bitstring

Automatically exported from code.google.com/p/bitstring
GNU General Public License v2.0
0 stars 0 forks source link

Permissive dropbits/takebits allow segmentation faults #18

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Well, it's really the same as:
http://code.google.com/p/bitstring/issues/detail?id=16&can=1

If you pass dropbits/takebits a negative number of bits, then an attempted 
access to your bitstring will result in a segfault.

I don't know whether the stance here is that the user should make the tests and 
the library should be super fast, or that the library should be safe.

If safe is better, I attached a patch. :)

Original issue reported on code.google.com by valentin.robert.42 on 4 Apr 2012 at 9:35

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks.  I have pushed your patch in revision 194.

Original comment by richard....@gmail.com on 4 Apr 2012 at 9:41