libmpathpersist: fix off-by-one error in PRIN length check
[multipath-tools/.git] / libmpathpersist / mpath_pr_ioctl.c
index a222b1e..c4f4ccd 100644 (file)
@@ -241,7 +241,7 @@ void mpath_format_readfullstatus(struct prin_resp *pr_buff, int len, int noisy)
                fdesc.rtpi = get_unaligned_be16(&p[18]);
 
                tid_len_len = get_unaligned_be32(&p[20]);
-               if (tid_len_len + 24 + k >= additional_length) {
+               if (tid_len_len + 24 + k > additional_length) {
                        condlog(0,
                                "%s: corrupt PRIN response: status descriptor end %d exceeds length %d",
                                __func__, tid_len_len + k + 24,