[libvirt] [PATCH 3/3] util: fix potential crash in virDiskNameParse

Peter Krempa pkrempa at redhat.com
Thu Jun 9 11:58:36 UTC 2016


On Mon, Jun 06, 2016 at 20:59:24 +0300, Maxim Nestratov wrote:
> As far as virDiskNameToIndex calls virDiskNameParse and doesn't
> check parameters and in most cases is used with disk->dst as a
> parameter and disk->dst is by virIndexToDiskName, which can
> return NULL, virDiskNameParse can crash in such cases.
> Let's be paranoic and sustain even such incorrect usage.

We expect disk->dst to be assigned all the time in more than just this
code thus I don't think adding this makes any sense.

Peter




More information about the libvir-list mailing list