]> git.ipfire.org Git - thirdparty/systemd.git/commit
udevadm: prevent segfault in blkid builtin when offset not specified 8293/head
authorDouglas Christman <DouglasChristman@gmail.com>
Wed, 28 Feb 2018 01:35:58 +0000 (20:35 -0500)
committerDouglas Christman <DouglasChristman@gmail.com>
Thu, 1 Mar 2018 13:50:38 +0000 (21:50 +0800)
commit6c1a6df3752f9df0780dee29b829dd91c0802f34
tree3a8c03f671834a7760f868e65b1a79515ae272f9
parent3a6a6889e1b2cc1495a5969e98d1b4d629730f13
udevadm: prevent segfault in blkid builtin when offset not specified

"--offset" takes an optional argument; if none is specified,
stroull() will attempt to parse a NULL pointer. For example:

$ udevadm test-builtin 'blkid --offset' /sys/dev/block/8:1

Update "--offset" to require an argument; also verify that the
offset is not negative.
src/udev/udev-builtin-blkid.c