]> err.no Git - util-linux/commit
libblkid: fix segfault in blkid_do_probe()
authorKarel Zak <kzak@redhat.com>
Thu, 1 Oct 2009 20:49:44 +0000 (22:49 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 1 Oct 2009 20:49:44 +0000 (22:49 +0200)
commitbd635f86e8a3f674ff2ae37dc89e3342cae6d9cc
tree1e454831ed747daedfb59ca38529b996519f01ec
parent78419f261750efecfcde9a3b3c91b828821256ef
libblkid: fix segfault in blkid_do_probe()

This:
pr->cur_chain += sizeof(struct blkid_chain);

is nonsense of course, there should be a cast to (char *) or so.

It seems that the most robust solution is to avoid this game with
pointers and use chain->driver-id which is useful as array index.

Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/probe.c