Excess memory allocation
Created by: Smattr
IIUC 17d4a603 modified ptrace_writemem
to expect the size of its input to be word-aligned. It did this by pushing the alignment adjustment outwards into ptrace_writemem
's callers. However, the new alignment adjustment is not equivalent. In particular, prior to this commit the size would not be adjusted if it was already word-aligned. Following this commit a word-aligned size is incremented by another word. I'm unsure if this was intentional or not, but it looks to me as if this extra word is unnecessary and goes unused. If you agree with this assessment and are happy to take a pull request, I can have a go at changing this to only increase the size when it's not already word-aligned. Thanks!