MathewWi / sneek

Automatically exported from code.google.com/p/sneek
0 stars 0 forks source link

ES_DIVerify broken in r106 (solution) #58

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
lines having bug:
    for( r = 0; r < TMD->ContentCount; ++r )
        memcpy( Hashes + r * 20, (u8*)TMD + 0x1F4 + r*0x24, 20 );

In my loader, i'm getting error while executing Open Partition.

What revision are you using? With what configuration
(SNEEK/UNEEK/SNEEK+DI)?
SNEEK r106

Please provide any additional information below.

solution:

replace r*0x24 by r*20
or just replace those 2 lines by one (to gain speed):

memcpy( Hashes, (u8*)TMD + 0x1F4, 20*TMD->ContentCount);

Original issue reported on code.google.com by pour.gar...@gmail.com on 21 Jul 2010 at 12:42

GoogleCodeExporter commented 9 years ago
Code is working correctly.
Also your "solution" is wrong, it would return wrong data when more than one 
content is present.

Original comment by cred...@rypp.net on 21 Jul 2010 at 8:17

GoogleCodeExporter commented 9 years ago
I've started to use SNEEK a couple of months ago. I'm developing loader more 
than a year. It was working with normal NAND and older versions of SNEEK, but 
after i jumped to r106, i start to get errors while opening DVD. Correction 
mentioned above fixes issue. 
It looks very strange that normal NAND and old SNEEK are compatible to each 
other while r106 doesn't.
I'm at work now and can not check details. I will post more info as i'll reach 
home.

Original comment by pour.gar...@gmail.com on 22 Jul 2010 at 6:35

GoogleCodeExporter commented 9 years ago
ok. i found the source of problem.

after   
for( r = 0; r < TMD->ContentCount; ++r )
    memcpy( Hashes + r * 20, (u8*)TMD + 0x1F4 + r*0x24, 20 );

need to add this:
r = 0;

now it works fine :)

Original comment by pour.gar...@gmail.com on 22 Jul 2010 at 11:09