[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] C client trim() bug
Hi Martin,
this trim() bug was fixed already last week, please
checkout the C code from cvs (the memmove did miss to
move the \0 as well),
regards
Marcel
>>Hi All,
>>>>
>>>> Tentativly I'm pleased to say that xmlBlaster and c-lib work out
>
>>of the box
>
>>>> on OSX (Panther).
>>>>
>>>> Tested on both Dual G5 and G4 machines.
>>>>
>>>> I have one problem to discuss.
>>>>
>>>> trim();
>>>>
>>>> I'm not sure that it is needed and as it stands in certain cases
>
>>it seems to
>
>>>> not work.
>>>>
>>>> eg: send a message with a msgLen consisting of more 9999 bytes
>
>>and the c-lib
>
>>>> fails.
>>>>
>>>> current trim() processing results in " 9999" turning into
>
>>"9999 9999"
>
>>>> the sscanf will then only see 9999 and break on the space.
>>>>
>>>> if you sent an message containing 10000 bytes the input into
>
>>trim() will be
>
>>>> " 10000"
>>>> you will see "1000010000" returned and fail on the max payload limit.
>>>>
>>>> sscanf() is capable of handling " 10000" and determining that the %lu
>>>> value is 10000.
>>>>
>>>> Provided that the preceding data is certain to be spaces only
>
>>trim() is not
>
>>>> required.
>>>>
>>>> Otherwise I can post a fix to null the string correctly.
>>>>
>>>> Regards
>>>>
>>>> Martin
>>>>
>>>>
--
http://www.xmlBlaster.org