Hello DayWalker,
You are absolutely right that you can't control the size of the buffer in the call back. My point is that you are assuming the buffer to be null terminated which might not be the case. Thats the reason SDK also gives you the size of the buffer. You are not using that information while converting UTF-8 string to other format (i assume it be Unicode). So the conversion routine tries to read the whole memory starting from buffer till it finds a null character.