diff options
| author | Alex Valavanis <valavanisalex@gmail.com> | 2013-11-01 09:59:59 +0000 |
|---|---|---|
| committer | Alex Valavanis <valavanisalex@gmail.com> | 2013-11-01 09:59:59 +0000 |
| commit | 7796f674229e282f3a3b877e99bc687e0ab4e02e (patch) | |
| tree | fdc0ce3a101e1162347cf30f12d6e9f2809f1003 | |
| parent | add clang-format file, not sure if all settings are set the way we want them ... (diff) | |
| download | inkscape-7796f674229e282f3a3b877e99bc687e0ab4e02e.tar.gz inkscape-7796f674229e282f3a3b877e99bc687e0ab4e02e.zip | |
libcroco: Backport size checking fix (commit 209e5,aa60a)
Fixed bugs:
- https://launchpad.net/bugs/1246763
(bzr r12758)
| -rw-r--r-- | src/libcroco/cr-rgb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcroco/cr-rgb.c b/src/libcroco/cr-rgb.c index e0c28701a..b9f78ddba 100644 --- a/src/libcroco/cr-rgb.c +++ b/src/libcroco/cr-rgb.c @@ -418,14 +418,14 @@ cr_rgb_set_from_name (CRRgb * a_this, const guchar * a_color_name) g_return_val_if_fail (a_this && a_color_name, CR_BAD_PARAM_ERROR); - for (i = 0; i < sizeof (gv_standard_colors); i++) { + for (i = 0; i < G_N_ELEMENTS (gv_standard_colors); i++) { if (!strcmp ((char *)a_color_name, gv_standard_colors[i].name)) { cr_rgb_set_from_rgb (a_this, &gv_standard_colors[i]); break; } } - if (i < sizeof (gv_standard_colors)) + if (i < G_N_ELEMENTS (gv_standard_colors)) status = CR_OK; else status = CR_UNKNOWN_TYPE_ERROR; |
