| Submitter | Kevin Wolf |
|---|---|
| Date | June 4, 2010, 4:33 p.m. |
| Message ID | <1275669195-28312-28-git-send-email-kwolf@redhat.com> |
| Download | mbox | patch |
| Permalink | /patch/54661/ |
| State | New |
| Headers | show |
Comments
Patch
diff --git a/blockdev.c b/blockdev.c index bd9783a..642ce75 100644 --- a/blockdev.c +++ b/blockdev.c @@ -422,7 +422,7 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi, int *fatal_error) dinfo->on_write_error = on_write_error; dinfo->opts = opts; if (serial) - strncpy(dinfo->serial, serial, sizeof(serial)); + strncpy(dinfo->serial, serial, sizeof(dinfo->serial) - 1); QTAILQ_INSERT_TAIL(&drives, dinfo, next); switch(type) {