Bug 173103 - array index out of bounds
Summary: array index out of bounds
Status: RESOLVED NOT A BUG
Alias: None
Product: konqueror
Classification: Applications
Component: khtml (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Konqueror Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-18 17:50 UTC by Daniel Marjamäki
Modified: 2008-10-18 19:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.