block: avoid buffer overrun by using pstrcpy, not strncpy
commitc2cba3d9314f972dfaf724d0ec2d018eb54c95f1
authorJim Meyering <meyering@redhat.com>
Thu, 4 Oct 2012 11:09:46 +0000 (4 13:09 +0200)
committerAnthony Liguori <aliguori@us.ibm.com>
Fri, 5 Oct 2012 12:58:36 +0000 (5 07:58 -0500)
tree2a3572afbfaa3bbac89eb0a5166b4384bb60bf81
parentbfad67399bcca8c1afbbc93593d365044d92f7c6
block: avoid buffer overrun by using pstrcpy, not strncpy

Also, use PATH_MAX, rather than the arbitrary 1024.
Using PATH_MAX is more consistent with other filename-related
variables in this file, like backing_filename and tmp_filename.

Acked-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
block.c