found memory corruption in the obt xqueue and paths

This commit is contained in:
Dana Jansens 2010-04-28 10:59:42 -04:00
parent 55b84316bb
commit 5e424b81d2
2 changed files with 4 additions and 4 deletions

View file

@ -126,7 +126,7 @@ static void find_uid_gid(uid_t *u, gid_t **g, guint *n)
} }
endgrent(); endgrent();
qsort(*g, sizeof(gid_t), *n, gid_cmp); qsort(*g, *n, sizeof(gid_t), gid_cmp);
} }
ObtPaths* obt_paths_new(void) ObtPaths* obt_paths_new(void)

View file

@ -78,8 +78,8 @@ static inline void grow(void) {
if (qend < qstart) { /* it wraps around to 0 right now */ if (qend < qstart) { /* it wraps around to 0 right now */
for (i = 0; i <= qend; ++i) for (i = 0; i <= qend; ++i)
q[newsz+i] = q[i]; q[qsz+i] = q[i];
qend = newsz + qend; qend = qsz + qend;
} }
qsz = newsz; qsz = newsz;
@ -113,7 +113,7 @@ static gboolean read_events(gboolean block)
return sth; /* return if we read anything */ return sth; /* return if we read anything */
} }
static void pop(gulong p) static void pop(const gulong p)
{ {
/* remove the event */ /* remove the event */
--qnum; --qnum;