+2002-02-20 Padraig O'Briain <padraig.obriain@sun.com>
+
+ * atk/atktext.c:
+ Add check for offset being negative in functions which have offset
+ parameter and return immediately if so.
+
2002-02-15 Padraig O'Briain <padraig.obriain@sun.com>
* atk/atkcomponent.h:
iface = ATK_TEXT_GET_IFACE (text);
+ if (start_offset < 0 || end_offset < 0)
+ return NULL;
+
if (iface->get_text)
return (*(iface->get_text)) (text, start_offset, end_offset);
else
g_return_val_if_fail (ATK_IS_TEXT (text), (gunichar) 0);
+ if (offset < 0)
+ return (gunichar) 0;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_character_at_offset)
else
real_end_offset = &local_end_offset;
+ if (offset < 0)
+ return NULL;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_text_after_offset)
else
real_end_offset = &local_end_offset;
+ if (offset < 0)
+ return NULL;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_text_at_offset)
else
real_end_offset = &local_end_offset;
+ if (offset < 0)
+ return NULL;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_text_before_offset)
else
real_height = &local_height;
+ *real_x = 0;
+ *real_y = 0;
+ *real_width = 0;
+ *real_height = 0;
+
+ if (offset < 0)
+ return;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_character_extents)
(*(iface->get_character_extents)) (text, offset, real_x, real_y, real_width, real_height, coords);
- else
- {
- *real_x = 0;
- *real_y = 0;
- *real_width = 0;
- *real_height = 0;
- }
}
/**
else
real_end_offset = &local_end_offset;
+ if (offset < 0)
+ return NULL;
+
iface = ATK_TEXT_GET_IFACE (text);
if (iface->get_run_attributes)