]> git.proxmox.com Git - proxmox-backup.git/commit
tape: changer: handle invalid descriptor data from library in status page
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 26 Jul 2021 07:20:41 +0000 (09:20 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 26 Jul 2021 08:05:37 +0000 (10:05 +0200)
commit42b010174ea902a1c11709da18faa754293dc4ab
tree79d6b0777404741493aeffdd1e3d8a4bfe30bbfd
parent68e77657e613d30355d3e62519e15b334e5a4a32
tape: changer: handle invalid descriptor data from library in status page

We get the descriptor length from the library and use that in
'chunks_exact', which panics on length 0. Catch that case
and bail out, since that makes no sense here anyway.

This could prevent a panic, in case a library sends wrong data.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
src/tape/changer/sg_pt_changer.rs