Share

Common Image Generator Interface (CIGI)

Tracker: Bugs

5 cigi message buffer size bug? - ID: 1631927
Last Update: Settings changed ( gregbasler )

Hi,

I have been working on applications that send out cigi messages for a
while, but it's just recently that I started to look into the source code
of the cigi API, and just today that I looked for and found this website.
OK on to topic. I looked into the function CigiCreateSession() in
cigi_api.c from the cigi api/sdk package. It's version 2.7.1, although the
part I'm concerned seems to be unchanged from version 1.0 that I'm actually
using. There is a BasePtrs, a BufferPtrs, and a ThresholdPtrs for each
buffer created for a session. BasePtrs is the pointer to the start of the
particular buffer, BufferPtrs is the pointer to the current position in the
buffer, and ThresholdPtrs is the end-of-buffer marker for the buffer,
taking into consideration of a one byte space needed for CIGI_OPCODE_NONE
when closing a cigi message. For outgoing messages, BufferPtrs is
initialized as BasePtrs plus the size of the CIGI_IG_CONTROL packet. In the
code, ThresholdPtrs is assigned as (BufferPtrs + bufferszie - 1). Shouldn't
it be (BasePtrs + buffersize - 1) instead? The actual buffer starts at
BasePtrs, not at the initial value of BufferPtrs. If my thinking is flawed,
could somebody in the know explain the logic to me? The issue is bothering
me, and all the more because if this is indeed a bug, it should potentially
lead to crashes but somehow I don't recall experiencing any.

Thanks in advance,

Yefei


Yefei He ( yefeihe ) - 2007-01-10 01:36

5

Closed

None

Nobody/Anonymous

API (deprecated)

None

Public


Comment ( 1 )




Date: 2009-11-06 22:24
Sender: gregbaslerProject Admin

This is only in the API/SDK.code set.
The API/SDK code set is deprecated and no longer supported.


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 2 )

Field Old Value Date By
status_id Open 2009-11-06 22:25 gregbasler
close_date - 2009-11-06 22:25 gregbasler