diff mbox

readsector0: the length of the buffer wrong

Message ID OF3CB78F61.50E78D53-ON48257FE7.003E97A1-48257FE7.0040E0D4@zte.com.cn (mailing list archive)
State Not Applicable, archived
Delegated to: christophe varoqui
Headers show

Commit Message

kai zhang July 5, 2016, 11:48 a.m. UTC
hi,

The length of the buffer is 4096, not 4069 in sg_read().
 
---
 libmultipath/checkers/readsector0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Christophe Varoqui July 8, 2016, 7:34 a.m. UTC | #1
Merged.
Thanks.

On Tue, Jul 5, 2016 at 1:48 PM, <zhang.kai16@zte.com.cn> wrote:

> hi,
>
> The length of the buffer is 4096, not 4069 in sg_read().
>
> ---
> libmultipath/checkers/readsector0.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libmultipath/checkers/readsector0.c
> b/libmultipath/checkers/readsector0.c
> index 0550fb6..1c2a868 100644
> --- a/libmultipath/checkers/readsector0.c
> +++ b/libmultipath/checkers/readsector0.c
> @@ -29,7 +29,7 @@ int libcheck_check (struct checker * c)
>                  unsigned char sbuf[SENSE_BUFF_LEN];
>                  int ret;
>
> -                 ret = sg_read(c->fd, &buf[0], 4069, &sbuf[0],
> +                 ret = sg_read(c->fd, &buf[0], 4096, &sbuf[0],
>                                         SENSE_BUFF_LEN, c->timeout);
>
>                  switch (ret)
> --
> 1.9.1
>
>
>
> --------------------------------------------------------
> ZTE Information Security Notice: The information contained in this mail (and any attachment transmitted herewith) is privileged and confidential and is intended for the exclusive use of the addressee(s).  If you are not an intended recipient, any disclosure, reproduction, distribution or other dissemination or use of the information contained is strictly prohibited.  If you have received this mail in error, please delete it and notify us immediately.
>
>
>
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/libmultipath/checkers/readsector0.c 
b/libmultipath/checkers/readsector0.c
index 0550fb6..1c2a868 100644
--- a/libmultipath/checkers/readsector0.c
+++ b/libmultipath/checkers/readsector0.c
@@ -29,7 +29,7 @@  int libcheck_check (struct checker * c)
                 unsigned char sbuf[SENSE_BUFF_LEN];
                 int ret;
 
-                ret = sg_read(c->fd, &buf[0], 4069, &sbuf[0],
+                ret = sg_read(c->fd, &buf[0], 4096, &sbuf[0],
                                       SENSE_BUFF_LEN, c->timeout);
 
                 switch (ret)