]> Dogcows Code - chaz/openbox/commitdiff
found memory corruption in the obt xqueue and paths
authorDana Jansens <danakj@orodu.net>
Wed, 28 Apr 2010 14:59:42 +0000 (10:59 -0400)
committerDana Jansens <danakj@orodu.net>
Wed, 28 Apr 2010 16:58:45 +0000 (12:58 -0400)
obt/paths.c
obt/xqueue.c

index 8afe4f711fe67b76cca7debeb55524ac98119615..b20eb48d1139459cbaf2e99e9bb0b497528494e2 100644 (file)
@@ -126,7 +126,7 @@ static void find_uid_gid(uid_t *u, gid_t **g, guint *n)
     }
     endgrent();
 
-    qsort(*g, sizeof(gid_t), *n, gid_cmp);
+    qsort(*g, *n, sizeof(gid_t), gid_cmp);
 }
 
 ObtPaths* obt_paths_new(void)
index 2304ea426c4acf06045cb89d43ae6447aae25b6f..e5d2da317de43419a677e592d110f7b598dcf5b6 100644 (file)
@@ -78,8 +78,8 @@ static inline void grow(void) {
 
         if (qend < qstart) { /* it wraps around to 0 right now */
             for (i = 0; i <= qend; ++i)
-                q[newsz+i] = q[i];
-            qend = newsz + qend;
+                q[qsz+i] = q[i];
+            qend = qsz + qend;
         }
 
         qsz = newsz;
@@ -113,7 +113,7 @@ static gboolean read_events(gboolean block)
     return sth; /* return if we read anything */
 }
 
-static void pop(gulong p)
+static void pop(const gulong p)
 {
     /* remove the event */
     --qnum;
This page took 0.025614 seconds and 4 git commands to generate.