libblkid: reset errno on ignored read requests · util-linux/util-linux@b59b25f · GitHub
Skip to content

Commit b59b25f

Browse files
committed
libblkid: reset errno on ignored read requests
blkid_probe_get_buffer() returns NULL without touching errno when the offset overflows or when the request is larger than 8 MiB. Both cases are meant to be ignored, like the "out of probing area" case below them, but the usual caller idiom is return errno ? -errno : 1; so a stale errno left over from an unrelated syscall turns an ignored request into a probing error. Addresses: #4701 Signed-off-by: Karel Zak <kzak@redhat.com>
1 parent 8ddec43 commit b59b25f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎libblkid/src/probe.c‎

Lines changed: 2 additions & 0 deletions

0 commit comments

Comments
 (0)