]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/sysfs: fix scanf format string [coverity scan]
authorKarel Zak <kzak@redhat.com>
Tue, 14 Jan 2014 17:02:06 +0000 (18:02 +0100)
committerKarel Zak <kzak@redhat.com>
Tue, 14 Jan 2014 17:02:06 +0000 (18:02 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
lib/sysfs.c

index ed0173a1cc8b9145030e4ee3471d766a78777084..5203e63fc10cad4f6275433624560a45c5312676 100644 (file)
@@ -659,7 +659,7 @@ int sysfs_scsi_get_hctl(struct sysfs_cxt *cxt, int *h, int *c, int *t, int *l)
                return -1;
        hctl++;
 
-       if (sscanf(hctl, "%d:%d:%d:%d", &cxt->scsi_host, &cxt->scsi_channel,
+       if (sscanf(hctl, "%u:%u:%u:%u", &cxt->scsi_host, &cxt->scsi_channel,
                                &cxt->scsi_target, &cxt->scsi_lun) != 4)
                return -1;