[omniORB] Another wide-string bug + fix

Duncan Grisby dgrisby@uk.research.att.com
Tue, 31 Jul 2001 10:03:15 +0100


On Tuesday 31 July, Stephen Crawley wrote:

> Unfortunately, the loop runs past the end of 'ws' by one wide character.
> The problem is that omniCodeSetUtil::allocW carefully allocates 'len'
> characters, not 'len + 1'.
> 
> One possible fix is to change the first line above to:
> 
>   ws = omniCodeSetUtil::allocW(len + 1);

Thanks for spotting that. The fix you suggest is correct, and I've
checked it in.

> Might this bug occur in other codeset adapters as well?

No -- I checked all the others, and they get it right.

Thanks,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --