freemyipod r186 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r185‎ | r186 | r187 >
Date:20:47, 2 September 2010
Author:theseven
Status:new
Tags:
Comment:
Fix a really silly libipodcrypto bug that caused header corruption
Modified paths:
  • /embios/trunk/tools/libipodcrypto.py (modified) (history)

Diff [purge]

Index: embios/trunk/tools/libipodcrypto.py
@@ -52,7 +52,7 @@
5353
5454 def nano2gcryptfirmware(data):
5555 data = data.ljust((len(data) + 0x3f) & ~0x3f, "\0")
56 - header = "\0\0\0\0\0x02\0\0\0\0x01\0\0\0\0x40\0\0\0\0\0\0\0" + struct.pack("<I", len(data))
 56+ header = "\0\0\0\0\x02\0\0\0\x01\0\0\0\x40\0\0\0\0\0\0\0" + struct.pack("<I", len(data))
5757 embios = libembios.Embios()
5858 embios.write(0x08000000, header.ljust(0x800, "\0") + data)
5959 embios.lib.dev.timeout = 20000