summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-19 17:23:39 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-06-19 17:23:39 +0000
commiteba2af633fb8fa3b20ad578184d79e1f0eabcefe (patch)
treebcc44d0b0e8c36caa1c6701ce9362d009a01d0dd /block.c
parent95ce326e5b47b4b841849f8a2ac7b96d6e204dfb (diff)
buffer overflow fix
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@932 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'block.c')
-rw-r--r--block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block.c b/block.c
index c1267888c8..e71adda191 100644
--- a/block.c
+++ b/block.c
@@ -92,7 +92,7 @@ int bdrv_open(BlockDriverState *bs, const char *filename, int snapshot)
bs->fd = -1;
bs->cow_fd = -1;
bs->cow_bitmap = NULL;
- strcpy(bs->filename, filename);
+ pstrcpy(bs->filename, sizeof(bs->filename), filename);
/* open standard HD image */
#ifdef _WIN32