Re: [Qemu-devel] [PATCH 1/6] qcow2: Avoid overflow in alloc_clusters_noref()

2014-04-30 Thread Kevin Wolf
Am 29.04.2014 um 19:03 hat Max Reitz geschrieben: > alloc_clusters_noref() stores the cluster index in a uint64_t. However, > offsets are often represented as int64_t (as for example the return > value of alloc_clusters_noref() itself demonstrates). Therefore, we > should make sure all offsets in t

[Qemu-devel] [PATCH 1/6] qcow2: Avoid overflow in alloc_clusters_noref()

2014-04-29 Thread Max Reitz
alloc_clusters_noref() stores the cluster index in a uint64_t. However, offsets are often represented as int64_t (as for example the return value of alloc_clusters_noref() itself demonstrates). Therefore, we should make sure all offsets in the allocated range of clusters are representable using int