Re: Bug report in Obex code

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

 



On Mon, Apr 11, 2011 at 12:56 AM, Claudiu Coman <claud.coman@xxxxxxxxx> wrote:
> Hello,
>
> While doing some documentation for my GSOC application, I found a small
> bug in the Obex code, in src/obex.c, function "obex_write_stream".
> There's the declaration:
> "uint8_t hi;"
> If the "if" statement body between lines 640-648 is executed, after the jump
> to the "add_header" tag, the switch statement will test an
> uninitialized variable.
> At first I thought about sending a patch myself, but I don't know what value
> the header index variable should be initialized with.
>
> Cheers,
> Claudiu
> --
> 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
>

In this case, I'd say that for a quick fix setting it to OBEX_HDR_BODY will do.

However I believe that this if block doesn't actually do anything now. Does it?

I think it was needed for old folder listing support (introduced in
commit c42eff92a9c2c177f788dd1ec429250e64f69a78) when the ftp plugin
was using os->buf directly. It doesn't seem that anything uses this
approach any more. Also not a single piece of code using os->finished
(this was for some old PBAP version). I think we can get rid of this
code. What do you think, guys?

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