From: Karel Zak Date: Tue, 14 Jan 2014 17:00:14 +0000 (+0100) Subject: libmount: fix scanf format string [coverity scan] X-Git-Tag: v2.25-rc1~640 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea97feab8d35d0597ba134a0049183e8ca9e048b;p=thirdparty%2Futil-linux.git libmount: fix scanf format string [coverity scan] Signed-off-by: Karel Zak --- diff --git a/libmount/src/tab_parse.c b/libmount/src/tab_parse.c index 9246d420bd..b72d9b343e 100644 --- a/libmount/src/tab_parse.c +++ b/libmount/src/tab_parse.c @@ -127,8 +127,8 @@ static int mnt_parse_mountinfo_line(struct libmnt_fs *fs, char *s) unsigned int maj, min; char *fstype = NULL, *src = NULL, *p; - rc = sscanf(s, "%u " /* (1) id */ - "%u " /* (2) parent */ + rc = sscanf(s, "%d " /* (1) id */ + "%d " /* (2) parent */ "%u:%u " /* (3) maj:min */ UL_SCNsA" " /* (4) mountroot */ UL_SCNsA" " /* (5) target */ @@ -272,8 +272,8 @@ static int mnt_parse_swaps_line(struct libmnt_fs *fs, char *s) rc = sscanf(s, UL_SCNsA" " /* (1) source */ UL_SCNsA" " /* (2) type */ - "%jd" /* (3) size */ - "%jd" /* (4) used */ + "%ju" /* (3) size */ + "%ju" /* (4) used */ "%d", /* priority */ &src,