commit | 2b5fbad49cdfcdad3e8771af3f967480eb708a5f | [log] [tgz] |
---|---|---|
author | Andrew Scull <ascull@google.com> | Fri Apr 05 13:55:56 2019 +0100 |
committer | Andrew Scull <ascull@google.com> | Fri Apr 05 14:11:12 2019 +0100 |
tree | 8171a99cbde7a75eff8e594233b0cea7bfa2a88d | |
parent | 8d9e12194d9e8ae86fc6dbe82ec6e7fc8fd1ef52 [diff] [blame] |
Move from memset to memset_s. This adds the extra bounds checks and panics if there is a violation. Change-Id: I9db3ca44be4f9c39964d912b57fe7b68e2792bc1
diff --git a/src/cpu.c b/src/cpu.c index b2213d1..ca26122 100644 --- a/src/cpu.c +++ b/src/cpu.c
@@ -159,7 +159,7 @@ void vcpu_init(struct vcpu *vcpu, struct vm *vm) { - memset(vcpu, 0, sizeof(*vcpu)); + memset_s(vcpu, sizeof(*vcpu), 0, sizeof(*vcpu)); sl_init(&vcpu->lock); vcpu->regs_available = true; vcpu->vm = vm;