/[d-i]/people/slackydeb/kfreebsd/d-i/parted/unstable/libparted.freebsd.diskname.diff
ViewVC logotype

Contents of /people/slackydeb/kfreebsd/d-i/parted/unstable/libparted.freebsd.diskname.diff

Parent Directory Parent Directory | Revision Log Revision Log


Revision 60616 - (show annotations) (download)
Wed Sep 2 20:10:43 2009 UTC (5 years, 3 months ago) by aurel32
File size: 631 byte(s)
Strings from struct ata_params are not guaranteed to be null terminated

1 commit 498337899de42e718e5729fbdf663c50f14a651c
2 Author: Aurelien Jarno <aurelien@aurel32.net>
3 Date: Wed Sep 2 22:03:02 2009 +0200
4
5 Strings from struct ata_params are not guaranteed to be null terminated
6
7 diff --git a/libparted/arch/freebsd.c b/libparted/arch/freebsd.c
8 index 4be7962..ad1eaba 100644
9 --- a/libparted/arch/freebsd.c
10 +++ b/libparted/arch/freebsd.c
11 @@ -264,7 +264,7 @@ init_ide (PedDevice* dev)
12 break;
13 }
14 } else {
15 - snprintf(vendor_buf, 64, "%s/%s", params.model, params.revision);
16 + snprintf(vendor_buf, 64, "%.40s/%.8s", params.model, params.revision);
17 dev->model = strip_name (vendor_buf);
18 }
19

  ViewVC Help
Powered by ViewVC 1.1.5