soc: qcom: Fix memcpy operations in ramdump_read
Currently, for device memory addresses, which are not
aligned on 8 byte boundary, ramdump_read() copies the
bytes till the start of next aligned address. However,
this calculation does not take into account the case,
where copy_size is less that the number of bytes till
next alignment. This causes memcpy to copy device
memory to region, which is outside of the allocated
buffer. Fix this by copying only the copy_size buffer
for this case.
Change-Id: I918ab5886d664f89c0eebd99972f5b9960e1ae00
Signed-off-by:
Neeraj Upadhyay <neeraju@codeaurora.org>
Loading
Please register or sign in to comment