gnome-terminal r3324 - trunk/src



Author: chpe
Date: Sun Feb 22 18:45:14 2009
New Revision: 3324
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3324&view=rev

Log:
Fix possible gsize wraparound issue when demarshaling the data

Modified:
   trunk/src/terminal-util.c

Modified: trunk/src/terminal-util.c
==============================================================================
--- trunk/src/terminal-util.c	(original)
+++ trunk/src/terminal-util.c	Sun Feb 22 18:45:14 2009
@@ -569,11 +569,11 @@
 {
   GPtrArray *argv;
   const char *data, *nullbyte;
-  gsize len;
+  gssize len;
 
   g_return_val_if_fail (array != NULL, NULL);
 
-  if (array->len == 0) {
+  if (array->len == 0 || array->len > G_MAXSSIZE) {
     *argc = 0;
     return NULL;
   }



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