Skip to content

Commit

Permalink
zynq: rsa: Correct the total partition header size calculation
Browse files Browse the repository at this point in the history
Correct the partition header size calculation while copying the
partition header information.
This fixes the issue of corrupting the bss section because of
the wrong size calculation during copy.

Signed-off-by: Siva Durga Prasad Paladugu <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
  • Loading branch information
Siva Durga Prasad Paladugu authored and Michal Simek committed Mar 4, 2014
1 parent 26e2cb1 commit a12c076
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion common/cmd_zynq_rsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static int zynq_get_partition_info(u32 image_base_addr)
parthdroffset += image_base_addr;

memcpy(&part_hdr[0], (u32 *)parthdroffset,
(sizeof(part_hdr)*ZYNQ_MAX_PARTITION_NUMBER));
(sizeof(struct partition_hdr) * ZYNQ_MAX_PARTITION_NUMBER));

return 0;
}
Expand Down

0 comments on commit a12c076

Please sign in to comment.