Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: more zle fixes



On Wednesday 23 February 2005 16:05, Peter Stephenson wrote:
> +    char s[MB_CUR_MAX+1];

MB_CUR_MAX is not required to be constant so the above may well be invalid on 
non-GCC.

conversion from wc to mb may require extra space for shift characters above 
MB_CUR_MAX. Completely bulletproof solution must check for resulting length 
and allocate buffer that is needed. Unfortunately it is not quite clear how 
to check length; wctomb(0, ...) does not return length, instead resets 
internal state.



Messages sorted by: Reverse Date, Date, Thread, Author