diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-05-15 12:11:18 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2018-05-15 12:11:18 +0100 |
commit | f0819c18672a939ad2a6c00c6fa37f73be7a54f3 (patch) | |
tree | 8e82f1fe6b2f2979c2329eb5e2b72cb8f108048a /sg_io.c | |
parent | 22464b6f492163fabe1041b09e1d2f753fd0d31a (diff) |
New upstream release.
Diffstat (limited to 'sg_io.c')
-rw-r--r-- | sg_io.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -46,6 +46,9 @@ int scsi_get_serial(int fd, void *buf, size_t buf_len) if (rv) return rv; + if ((io_hdr.info & SG_INFO_OK_MASK) != SG_INFO_OK) + return -1; + rsp_len = rsp_buf[3]; if (!rsp_len || buf_len < rsp_len) |