Bug 356556

Summary: libX11 - bad array index
Product: [openSUSE] openSUSE 11.0 Reporter: Marcus Meissner <meissner>
Component: X.OrgAssignee: Stefan Dirsch <sndirsch>
Status: RESOLVED FIXED QA Contact: E-mail List <xorg-maintainer-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Alpha 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 240922    

Description Marcus Meissner 2008-01-27 20:37:19 UTC
gcc warns:
imLcPrs.c:595: warning: array subscript is above array bounds

it is a typo in:

libX11-1.1.3/modules/im/ximcp/imLcPrs.c

    l = _Xmbstoutf8(local_utf8_buf, rhs_string_mb, LOCAL_UTF8_BUFSIZE - 1);
    if (l == LOCAL_UTF8_BUFSIZE - 1) {
        local_wc_buf[l] = '\0';
    }

it should be local_utf8_buf in that line, and likely is a copy and paste error.
Comment 1 Stefan Dirsch 2008-01-29 17:48:09 UTC
fixed for STABLE/Factory.