summaryrefslogtreecommitdiff
path: root/util_lib/sha256.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2012-07-18 09:33:51 -0400
committerSimon Horman <horms@verge.net.au>2012-07-24 09:27:01 +0900
commitc96e7736d85e40685939011e6d51b3c0a28739a3 (patch)
treee7e0c86602c7f81c7b5ba0f7b541748d79f2e43f /util_lib/sha256.c
parent583c81c1c5e52520d18efc612c5e6894f4a4ed10 (diff)
vmcore-dmesg: Do not write beyond end of buffer
scan_vmcoreinfo() currently assumes that every vmcoreinfo note line ends with \n and overwrites new line with \0. But last entry in note, CRASHTIME= does not end with \n and this leads to corrupting memory as we write beyond end of buffer. Normally things were fine but when I added some fields to vmcoreinfo, this bug started showing and vmcore-dmesg started crashing. I am planning to send a patch to fix this in kernel but it might be good idea to handle this case in user space too so that vmcore-dmesg works fine with cores of older kernels. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'util_lib/sha256.c')
0 files changed, 0 insertions, 0 deletions