Re: [PATCH] attrib: Fix Read Blob error responses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 16 December 2014 at 08:51, Marcin Kraglak <marcin.kraglak@xxxxxxxxx> wrote:
> Read blob response with offset equal to value length should return
> zero length value intead of Invalid Offset Error.
> Found during qualification test case TC/GAR/SR/BV-08-C Read behind
> Long Characteristic Descriptor.
> ---
>  src/attrib-server.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/attrib-server.c b/src/attrib-server.c
> index 6571577..69e6cdc 100644
> --- a/src/attrib-server.c
> +++ b/src/attrib-server.c
> @@ -856,7 +856,7 @@ static uint16_t read_blob(struct gatt_channel *channel, uint16_t handle,
>
>         a = l->data;
>
> -       if (a->len <= offset)
> +       if (a->len < offset)
>                 return enc_error_resp(ATT_OP_READ_BLOB_REQ, handle,
>                                         ATT_ECODE_INVALID_OFFSET, pdu, len);
>
> --
> 1.9.3
>

Ping

-- 
BR
Marcin Kraglak
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux