gjs r72 - trunk/gi



Author: otaylor
Date: Tue Nov  4 15:20:52 2008
New Revision: 72
URL: http://svn.gnome.org/viewvc/gjs?rev=72&view=rev

Log:
Bug 559194 - Fix wrong length buffer in get_obj_key()

* gi/object.c:get_obj_key(): Fix length of cached_buf to be
OBJ_KEY_LEN+1 not OBJ_KEY_LEN to account for trailing \0


Modified:
   trunk/gi/object.c

Modified: trunk/gi/object.c
==============================================================================
--- trunk/gi/object.c	(original)
+++ trunk/gi/object.c	Tue Nov  4 15:20:52 2008
@@ -1330,7 +1330,7 @@
     /* not thread safe, but that's fine for now - just nuke the
      * cache thingy if we ever need thread safety
      */
-    static char cached_buf[OBJ_KEY_LEN];
+    static char cached_buf[OBJ_KEY_LEN+1];
     static JSRuntime *cached_for = NULL;
 
     if (cached_for != runtime) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]