From eba2af633fb8fa3b20ad578184d79e1f0eabcefe Mon Sep 17 00:00:00 2001 From: bellard Date: Sat, 19 Jun 2004 17:23:39 +0000 Subject: buffer overflow fix git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@932 c046a42c-6fe2-441c-8c8c-71466251a162 --- block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'block.c') 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 -- cgit v1.2.3