Kevin Wolf 11b128f406 qcow2: Fix NULL dereference in qcow2_open() error path (CVE-2014-0146)
The qcow2 code assumes that s->snapshots is non-NULL if s->nb_snapshots
!= 0. By having the initialisation of both fields separated in
qcow2_open(), any error occuring in between would cause the error path
to dereference NULL in qcow2_free_snapshots() if the image had any
snapshots.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-04-01 15:22:35 +02:00
..
2014-02-14 16:22:33 +01:00
2014-02-14 16:22:33 +01:00
2014-02-14 21:07:13 +01:00
2014-02-14 20:50:19 +01:00
2014-02-14 16:22:33 +01:00
2014-03-13 01:21:45 +01:00
2014-02-14 16:22:33 +01:00
2014-02-14 21:02:27 +01:00
2014-03-13 01:21:56 +01:00
2014-02-14 21:01:03 +01:00
2014-03-13 01:21:56 +01:00
2014-02-14 16:22:33 +01:00