PERFORCE change 100092 for review
Clément Lecigne
clem1 at FreeBSD.org
Mon Jun 26 21:13:39 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100092
Change 100092 by clem1 at clem1_ipv6vulns on 2006/06/26 21:10:20
fix bad encoding when field size is lower than 1 bytes.
Affected files ...
.. //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/pcs.py#5 edit
Differences ...
==== //depot/projects/soc2006/clem1_ipv6vulns/pcs/pcs/pcs.py#5 (text+ko) ====
@@ -268,7 +268,7 @@
if fieldBR < byteBR:
shift = byteBR - fieldBR
byteBR -= fieldBR
- mask = ((2 ** shift) - 1) << shift
+ mask = ((2 ** fieldBR) - 1) << shift
byte = (byte | ((value << shift) & mask))
# Done with the field, not with the byte get new field
break
@@ -289,7 +289,6 @@
byteBR = 8
# Done with the byte and the field have a nice day
break
-
self._bytes = ''.join(bytearray) # Install the new value
class Chain(list):
More information about the p4-projects
mailing list