The documentation for xptSetDocumentInfo states that the cbLength field of the XptCommunicationInfo_t can be set to -1, in order to indicate that the document length is unknown.
However, it appears that the obxGetDocumentInfo function in obexbinding.c always attempts to allocate a cbLength sized buffer also if the cbLength field is -1, which obviously always fails.
Is it the documentation of xptSetDocumentInfo or the implementation of the obexbinding which is erroneous.
I'm attempting to build a message on the fly and thus I don't know the size up front.
Johan
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
The documentation for xptSetDocumentInfo states that the cbLength field of the XptCommunicationInfo_t can be set to -1, in order to indicate that the document length is unknown.
However, it appears that the obxGetDocumentInfo function in obexbinding.c always attempts to allocate a cbLength sized buffer also if the cbLength field is -1, which obviously always fails.
Is it the documentation of xptSetDocumentInfo or the implementation of the obexbinding which is erroneous.
I'm attempting to build a message on the fly and thus I don't know the size up front.
Johan