[Bug 509562] Re: euca-bundle-image returns Odd-length string error

Scott Moser smoser at canonical.com
Mon Sep 20 14:45:43 BST 2010


comment 12 contained a bad analysis.
The code that is now committed to maverick gets 31.5 hex chars of randomness rather than 32.
I'm not going to bother changing in maverick.

That said, the right code for upstream is probably something like:
      # get 17 bytes of randomness with top bit a '1'.
      # convert to a hex string like '0x<hex 34 digits>L'
      # then take the last 32 of the hex digits, giving 32 random hex chars
      iv = (hex(BN.rand(17 * 8,top=0)))[4:36]

I'm attaching a better patch for upstream.


** Patch added: "patch against upstream euca2ools (revno 309)"
   https://bugs.launchpad.net/ubuntu/+source/eucalyptus/+bug/509562/+attachment/1613376/+files/lp-509562-upstream-fix.diff

** Also affects: euca2ools (Ubuntu Maverick)
   Importance: Medium
       Status: Fix Released

** Also affects: eucalyptus (Ubuntu Maverick)
   Importance: Medium
       Status: Invalid

-- 
euca-bundle-image returns Odd-length string error
https://bugs.launchpad.net/bugs/509562
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to eucalyptus in ubuntu.



More information about the Ubuntu-server-bugs mailing list