From 0201d890996640d0d2f2a2dbf999d4f81d29d3fc Mon Sep 17 00:00:00 2001 From: philsmd Date: Wed, 25 Jan 2017 19:44:13 +0100 Subject: [PATCH] fixed offset for dpsl buffer --- src/interface.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/interface.c b/src/interface.c index 5c8a04c13..ca73b7e77 100644 --- a/src/interface.c +++ b/src/interface.c @@ -13719,17 +13719,17 @@ int itunes_backup_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MA { u32 *dpsl_buf_ptr = (u32 *) itunes_backup->dpsl; - dpsl_buf_ptr[ 5] = hex_to_u32 ((const u8 *) &dpsl_pos[ 0]); - dpsl_buf_ptr[ 6] = hex_to_u32 ((const u8 *) &dpsl_pos[ 8]); - dpsl_buf_ptr[ 7] = hex_to_u32 ((const u8 *) &dpsl_pos[16]); - dpsl_buf_ptr[ 8] = hex_to_u32 ((const u8 *) &dpsl_pos[24]); - dpsl_buf_ptr[ 9] = hex_to_u32 ((const u8 *) &dpsl_pos[32]); + dpsl_buf_ptr[0] = hex_to_u32 ((const u8 *) &dpsl_pos[ 0]); + dpsl_buf_ptr[1] = hex_to_u32 ((const u8 *) &dpsl_pos[ 8]); + dpsl_buf_ptr[2] = hex_to_u32 ((const u8 *) &dpsl_pos[16]); + dpsl_buf_ptr[3] = hex_to_u32 ((const u8 *) &dpsl_pos[24]); + dpsl_buf_ptr[4] = hex_to_u32 ((const u8 *) &dpsl_pos[32]); - dpsl_buf_ptr[ 5] = byte_swap_32 (dpsl_buf_ptr[ 5]); - dpsl_buf_ptr[ 6] = byte_swap_32 (dpsl_buf_ptr[ 6]); - dpsl_buf_ptr[ 7] = byte_swap_32 (dpsl_buf_ptr[ 7]); - dpsl_buf_ptr[ 8] = byte_swap_32 (dpsl_buf_ptr[ 8]); - dpsl_buf_ptr[ 9] = byte_swap_32 (dpsl_buf_ptr[ 9]); + dpsl_buf_ptr[0] = byte_swap_32 (dpsl_buf_ptr[ 0]); + dpsl_buf_ptr[1] = byte_swap_32 (dpsl_buf_ptr[ 1]); + dpsl_buf_ptr[2] = byte_swap_32 (dpsl_buf_ptr[ 2]); + dpsl_buf_ptr[3] = byte_swap_32 (dpsl_buf_ptr[ 3]); + dpsl_buf_ptr[4] = byte_swap_32 (dpsl_buf_ptr[ 4]); } return (PARSER_OK);