diff options
| author | Dana Jansens <danakj@orodu.net> | 2010-04-28 10:59:42 -0400 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2010-04-28 12:58:45 -0400 |
| commit | 5e424b81d24d82f7584ea175cd6579baba3695d7 (patch) | |
| tree | b7dbfff055c4d646db0f457ead2ced7ef36aeb37 /obt | |
| parent | 55b84316bb699fa530efe78d75ae8e1d57c1b57f (diff) | |
found memory corruption in the obt xqueue and paths
Diffstat (limited to 'obt')
| -rw-r--r-- | obt/paths.c | 2 | ||||
| -rw-r--r-- | obt/xqueue.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/obt/paths.c b/obt/paths.c index 8afe4f71..b20eb48d 100644 --- a/obt/paths.c +++ b/obt/paths.c @@ -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) diff --git a/obt/xqueue.c b/obt/xqueue.c index 2304ea42..e5d2da31 100644 --- a/obt/xqueue.c +++ b/obt/xqueue.c @@ -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; |
