summaryrefslogtreecommitdiff
path: root/libparted/labels/dvh.h
diff options
context:
space:
mode:
authorMing Liu <ming.liu@windriver.com>2013-02-16 10:16:20 +0800
committerBrian C. Lane <bcl@redhat.com>2014-04-10 09:28:59 -0700
commitfcf8dc3741c27602c64e5c4164ac26eca17ed5f3 (patch)
treecbaac290bb8f976de166a4a7824817c3b28ee2b9 /libparted/labels/dvh.h
parentdbcd731411369cd40c842ca492988308b444c42c (diff)
downloadparted-fcf8dc3741c27602c64e5c4164ac26eca17ed5f3.tar.gz
libparted: fix several integer overflows with dvh labels
Integer overflows was found in libparted/labels/dvh.c, while attemptting assign unsigned int values to int types in some places. Defined by unsigned int instead. * libparted/labels/dvh.h: Change int to unsigned int Signed-off-by: Ming Liu <ming.liu@windriver.com> Signed-off-by: Brian C. Lane <bcl@redhat.com>
Diffstat (limited to 'libparted/labels/dvh.h')
-rw-r--r--libparted/labels/dvh.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libparted/labels/dvh.h b/libparted/labels/dvh.h
index 4c25c99..7e7fae7 100644
--- a/libparted/labels/dvh.h
+++ b/libparted/labels/dvh.h
@@ -112,8 +112,8 @@ struct device_parameters {
struct volume_directory {
char vd_name[VDNAMESIZE]; /* name */
- int vd_lbn; /* logical block number */
- int vd_nbytes; /* file length in bytes */
+ unsigned int vd_lbn; /* logical block number */
+ unsigned int vd_nbytes; /* file length in bytes */
};
/*
@@ -125,9 +125,9 @@ struct volume_directory {
* NOTE: pt_firstlbn SHOULD BE CYLINDER ALIGNED
*/
struct partition_table { /* one per logical partition */
- int pt_nblks; /* # of logical blks in partition */
- int pt_firstlbn; /* first lbn of partition */
- int pt_type; /* use of partition */
+ unsigned int pt_nblks; /* # of logical blks in partition */
+ unsigned int pt_firstlbn; /* first lbn of partition */
+ int pt_type; /* use of partition */
};
#define PTYPE_VOLHDR 0 /* partition is volume header */