Enlightenment CVS committal
Author : tsauerbeck
Project : e17
Module : libs/ecore
Dir : e17/libs/ecore/src/lib/ecore_x
Modified Files:
ecore_x_window_prop.c
Log Message:
check for invalid protocol values before accessing the array
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ecore/src/lib/ecore_x/ecore_x_window_prop.c,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -3 -r1.45 -r1.46
--- ecore_x_window_prop.c 22 Aug 2004 21:57:07 -0000 1.45
+++ ecore_x_window_prop.c 22 Aug 2004 22:04:12 -0000 1.46
@@ -472,7 +472,11 @@
int protos_count = 0;
int already_set = 0;
int i;
-
+
+ /* check for invalid values */
+ if (protocol < 0 || protocol >= ECORE_X_WM_PROTOCOL_NUM)
+ return;
+
proto = _ecore_x_atoms_wm_protocols[protocol];
if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
@@ -539,6 +543,10 @@
Atom proto, *protos = NULL;
int i, ret = 0, protos_count = 0;
+ /* check for invalid values */
+ if (protocol < 0 || protocol >= ECORE_X_WM_PROTOCOL_NUM)
+ return 0;
+
proto = _ecore_x_atoms_wm_protocols[protocol];
if (!XGetWMProtocols(_ecore_x_disp, win, &protos, &protos_count))
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs