Revision: 7429
Author:   ek.kato
Date:     Mon Jan 30 17:14:06 2012
Log:      * uim/skk.c (do_search_line) : Avoid possible integer overflow.

http://code.google.com/p/uim/source/detail?r=7429

Modified:
 /trunk/uim/skk.c

=======================================
--- /trunk/uim/skk.c    Wed Jan 11 00:17:24 2012
+++ /trunk/uim/skk.c    Mon Jan 30 17:14:06 2012
@@ -344,7 +344,7 @@
 {
   char buf[256];
   char *r;
-  int idx = (min + max) / 2;
+  int idx = ((unsigned int)min + (unsigned int)max) >> 1;
   int c = 0;

   if (abs(max - min) < 4)

Reply via email to