Fix out of bound access in struct pattern->type

The pattern structure is hardcoded to hold 7 elements, yet the
pattern_names array in cairo-surface-observer.c is initialized with 8
strings.  This causes a crash in print_array at line 1587 when it tries
to access the 8th member.

Hence changed the 'type' array from type[7] to type[8] to avoid out of
bound access.

Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=91266
Signed-off-by: Ashim <ashim.shah@samsung.com>
Reviewed-by: Bryce Harrington <bryce@osg.samsung.com>
This commit is contained in:
Ashim 2015-07-09 10:43:30 +05:30 committed by Bryce Harrington
parent ad45e8f99f
commit 498fc2fbe3

View file

@ -62,7 +62,7 @@ struct extents {
};
struct pattern {
unsigned int type[7]; /* native/record/other surface/gradients */
unsigned int type[8]; /* native/record/other surface/gradients */
};
struct path {