On 02/22/2011 11:00 AM, Marcelo Tosatti wrote:
+
+static void blkcopy_switch(BdrvCopyState *s)
+{
+    char src_filename[1024];
+    int open_flags;
+
+    strncpy(src_filename, s->src->filename, sizeof(src_filename));
+    open_flags = s->src->open_flags;
strncpy doesn't leave a NULL terminator if it runs out of space.  I 
don't think that's your desire here.
Regards,

Anthony Liguori

Reply via email to