Bug 173103

Summary: array index out of bounds
Product: [Applications] konqueror Reporter: Daniel Marjamäki <danielm77>
Component: khtmlAssignee: Konqueror Bugs <konqueror-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: porten
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Daniel Marjamäki 2008-10-18 17:50:19 UTC
Version:            (using Devel)
OS:                Linux
Installed from:    Compiled sources


[khtml/css/cssparser.cpp:2206] -> [khtml/css/cssparser.cpp:2084]: Array index out of bounds
[khtml/css/cssparser.cpp:2228] -> [khtml/css/cssparser.cpp:2119]: Array index out of bounds

At line 2205 we have this code:
        int colorValues[3];
        if (!parseColorParameters(value, colorValues, false))
            return 0;

In parseColorParameters this line is bad..
    colorArray[3] = ...


There is a similar problem if you look at line 2228. The array index at line 2119 is out of bounds.
Comment 1 Harri Porten 2008-10-18 18:21:36 UTC
Thanks for the report but are you sure the analysis is correct? The parseAlpha parameter is set to false and the colorArray[3] assignment is guarded by a if(parseAlpha) check. So it'll not be executed in this case. 
Comment 2 Daniel Marjamäki 2008-10-18 19:42:08 UTC
That is true. I didn't consider the parseAlpha.