-
Vladimir Sementsov-Ogievskiy authored
Initialize received variable. Otherwise, is is possible for server to answer without any contexts, but we will set context_id to something random (received_id is not initialized too) and return 1, which is wrong. To solve it, just initialize received to false. Initialize received_id too, just to make all possible checkers happy. Bug was introduced in 78a33ab5 "nbd: BLOCK_STATUS for standard get_block_status function: client part" with the whole function. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20180427142002.21930-2-vsementsov@virtuozzo.com>
Reviewed-by:
Eric Blake <eblake@redhat.com>
CC: qemu-stable@nongnu.org
Signed-off-by:
Eric Blake <eblake@redhat.com>Vladimir Sementsov-Ogievskiy authoredInitialize received variable. Otherwise, is is possible for server to answer without any contexts, but we will set context_id to something random (received_id is not initialized too) and return 1, which is wrong. To solve it, just initialize received to false. Initialize received_id too, just to make all possible checkers happy. Bug was introduced in 78a33ab5 "nbd: BLOCK_STATUS for standard get_block_status function: client part" with the whole function. Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20180427142002.21930-2-vsementsov@virtuozzo.com>
Reviewed-by:
Eric Blake <eblake@redhat.com>
CC: qemu-stable@nongnu.org
Signed-off-by:
Eric Blake <eblake@redhat.com>
Loading