]> git.proxmox.com Git - qemu.git/commit
ppc: avoid buffer overrun: use pstrcpy, not strncpy
authorJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2012 11:09:52 +0000 (13:09 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Oct 2012 12:58:37 +0000 (07:58 -0500)
commitae2150680190e510dcbcdfdbfb3a54369c75367f
tree7188095d39ccc4ab2e210a376b3df2e0a8dc8640
parent3eadc68ebd174f5bad51fe6e0bbcf6d6651c784c
ppc: avoid buffer overrun: use pstrcpy, not strncpy

A terminal NUL is required by caller's use of strchr.
It's better not to use strncpy at all, since there is no need
to zero out hundreds of trailing bytes for each iteration.

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-ppc/kvm.c