Tamas TEVESZ wrote:
> 
> excerpts from my local tree, part 4
> 
> i'm not exactly sure why this is good, but they must have had a good 
> reason.

>From the Debian changelog:

  * 70_fix_overrun.diff: New patch, fix buffer overrun when creating new
    workspaces in Romanian locales. (Closes: #397412)

http://bugs.debian.org/397412

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=397412#129 is the real
intersting part. Looks like the patch author took the easy way out of
increasing MAX_WORKSPACENAME_WIDTH instead of replacing strcpy.

With certain encodings (UTF-8, UTF-16, etc) neither 32 nor 64 bytes may
be sufficient. The more prudent course would be to allocate the buffer
at assignment.

As much as I dislike it, replacing the strcpy with strncpy and
increasing MAX_WORKSPACENAME_WIDTH will work as a temporary measure.

-- 
John H. Robinson, IV          [email protected]
                                                                 http  ((((
WARNING: I cannot be held responsible for the above,         sbih.org ( )(:[
as apparently my cats have learned how to type.          spiders.html  ((((


-- 
To unsubscribe, send mail to [email protected].

Reply via email to