From: Vaclav Dolezal Date: Tue, 30 Jan 2018 12:50:15 +0000 (+0100) Subject: libblkid: atari - reject devices with blocksize != 512 X-Git-Tag: v2.32-rc1~42^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=046351760f1a3e739ff20eb3615676cfdff5742d;p=thirdparty%2Futil-linux.git libblkid: atari - reject devices with blocksize != 512 Signed-off-by: Vaclav Dolezal --- diff --git a/libblkid/src/partitions/atari.c b/libblkid/src/partitions/atari.c index 432df20254..1224a577c3 100644 --- a/libblkid/src/partitions/atari.c +++ b/libblkid/src/partitions/atari.c @@ -186,6 +186,10 @@ static int probe_atari_pt(blkid_probe pr, int rc = 0; off_t hdsize; + /* Atari partition is not defined for other sector sizes */ + if (blkid_probe_get_sectorsize(pr) != 512) + goto nothing; + rs = (struct atari_rootsector *) blkid_probe_get_sector(pr, 0); if (!rs) { if (errno)