]> Dogcows Code - chaz/openbox/blobdiff - obt/xqueue.c
found memory corruption in the obt xqueue and paths
[chaz/openbox] / obt / xqueue.c
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.022156 seconds and 4 git commands to generate.