diff options
author | Laszlo Ersek <lersek@redhat.com> | 2014-05-20 13:39:41 +0200 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-06-11 10:10:28 -0400 |
commit | ae3f88f60fb9f42bb3679311c2fbff8e1868ea47 (patch) | |
tree | 31633e2c904f4359133abe064d518f5ed41130a7 /kvm-all.c | |
parent | b780bf8eff43fc49b071795292dea5d05990fff3 (diff) |
dump: fill in the flat header signature more pleasingly to the eye
The "mh.signature" array field has size 16, and is zeroed by the preceding
memset(). MAKEDUMPFILE_SIGNATURE expands to a string literal with string
length 12 (size 13). There's no need to measure the length of
MAKEDUMPFILE_SIGNATURE at runtime, nor for the extra zero-filling of
"mh.signature" with strncpy().
Use memcpy() with MIN(sizeof, sizeof) for robustness (which is an integer
constant expression, evaluable at compile time.)
Approximately-suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Diffstat (limited to 'kvm-all.c')
0 files changed, 0 insertions, 0 deletions