Ticket #3 (closed defect: fixed)

Opened 19 months ago

Last modified 7 months ago

Custom transport fails when insufficient bytes read

Reported by: a_villacis Owned by: somebody
Priority: major Milestone:
Component: openobex-lib Version:
Keywords: Cc:

Description

This patch fixes a (IMHO) serious bug in the custom transport. If the custom transport read an insufficient (but still nonzero) number of bytes at a time, the read routine at lib/obex_main.c can enter a situation in which the first instance of /* Check if we are still connected */ consumes all the available bytes, and the second instance sees an empty buffer, which it (incorrectly) interprets as an EOF, thus triggering OBEX_EV_LINKERR. This bug prevents obex_test from correctly sending or receiving objects when using the custom (serial) transport when the custom transport fails to feed big enough chunks.

Attachments

openobex-01-fix-custom-transport-try2.patch (0.7 KB) - added by a_villacis 19 months ago.
Check for buffer provided in custom transport scenario

Change History

Changed 19 months ago by a_villacis

Check for buffer provided in custom transport scenario

Changed 7 months ago by zany

  • status changed from new to closed
  • resolution set to fixed

Applied as "do not error if the data is from non-empty but partial buffer (custom transport) ". Thanks!

Note: See TracTickets for help on using tickets.