mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
Replace uses of strncpy (a GNU extension) with Qemu pstrcpy
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5531 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
9b4c14c35b
commit
be15b141e0
7 changed files with 10 additions and 9 deletions
|
@ -344,7 +344,7 @@ static int vmdk_parent_open(BlockDriverState *bs, const char * filename)
|
|||
if ((end_name - p_name) > sizeof (s->hd->backing_file) - 1)
|
||||
return -1;
|
||||
|
||||
strncpy(s->hd->backing_file, p_name, end_name - p_name);
|
||||
pstrcpy(s->hd->backing_file, end_name - p_name, p_name);
|
||||
if (stat(s->hd->backing_file, &file_buf) != 0) {
|
||||
path_combine(parent_img_name, sizeof(parent_img_name),
|
||||
filename, s->hd->backing_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue