all repos — openbox @ 5e424b81d24d82f7584ea175cd6579baba3695d7

openbox fork - make it a bit more like ryudo

found memory corruption in the obt xqueue and paths
Dana Jansens danakj@orodu.net
commit

5e424b81d24d82f7584ea175cd6579baba3695d7

parent

55b84316bb699fa530efe78d75ae8e1d57c1b57f

2 files changed, 4 insertions(+), 4 deletions(-)

jump to
M obt/paths.cobt/paths.c

@@ -126,7 +126,7 @@ }

} endgrent(); - qsort(*g, sizeof(gid_t), *n, gid_cmp); + qsort(*g, *n, sizeof(gid_t), gid_cmp); } ObtPaths* obt_paths_new(void)
M obt/xqueue.cobt/xqueue.c

@@ -78,8 +78,8 @@ g_assert(qnum > 0);

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 @@

return sth; /* return if we read anything */ } -static void pop(gulong p) +static void pop(const gulong p) { /* remove the event */ --qnum;