Re: [PATCH BlueZ 2/2] lib: Fix SDP_TEXT_STR16/SDP_URL_STR16 parsing

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

 



Hi Anderson,

> >> diff --git a/lib/sdp.c b/lib/sdp.c
> >> index ca474cd..b87f392 100644
> >> --- a/lib/sdp.c
> >> +++ b/lib/sdp.c
> >> @@ -1176,7 +1176,7 @@ static sdp_data_t *extract_str(const void *p, int bufsize, int *len)
> >>               }
> >>               n = bt_get_be16(p);
> >>               p += sizeof(uint16_t);
> >> -             *len += sizeof(uint16_t) + n;
> >> +             *len += sizeof(uint16_t);
> >
> > I do not get this fix. Isn't this str8 and url8 part wrong?
> 
> On the same function, next to the return, there is:
> 
> *len += n;
> 
> This is why STR8/URL8 actually are okay. For STR16 the "n" part is
> added twice due to the snippet I change in this patch.

good catch. However I like to see that tiny piece of extra information
in the commit message as well. Makes it a lot clearer.

Regards

Marcel


--
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