Updated patch, checks NULL return from malloc spotted by jhe Frédéric Dalleau wrote: > Dear all, > > I recently met an alignment trap in hcid. > Some device sent me an sdp request and the answer had to be fragmented > because the device reception buffer was very small. > After that i saw alignment trap. > The last trace I saw was : Continuation state size: 8 > The trace is located at sdpd/request.c : static sdp_cont_state_t > *sdp_cstate_get(uint8_t *buffer) > This function returns an unaligned pointer. > > I think this patch is ok, but it has never been tested, and possibly > other problems are hidden behind. > Instead of returning an unaligned pointer, the patch allocates a buffer. > > To test it, i could build a bluez with small sdp reception buffer and > ask an arm to give me fragmented reply. > This would save me some time if someone could tell me where to change > this value... > > BR, > Frederic > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > ------------------------------------------------------------------------ > > _______________________________________________ > Bluez-devel mailing list > Bluez-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bluez-devel