diff options
author | brendan%mozilla.org <devnull@localhost> | 2000-01-19 03:53:19 +0000 |
---|---|---|
committer | brendan%mozilla.org <devnull@localhost> | 2000-01-19 03:53:19 +0000 |
commit | dd3a7d760e718ea6f09dd4adb525453da70cd153 (patch) | |
tree | 19d54aafdb2121c08d0009681b527de32f3decb8 | |
parent | abf19263d8483da5de22cfe747052306e6a676c5 (diff) | |
download | nspr-hg-dd3a7d760e718ea6f09dd4adb525453da70cd153.tar.gz |
Fix based on rogerl's keen analysis to ancient circa 1995 bug (19165).SeaMonkey_M13_BASENSPRPUB_RELEASE_4_0_BASENSIFILE_01202000_BASENSIFILE_01192000_BASEANDREAS_URL_BASE
-rw-r--r-- | lib/ds/plarena.c | 2 | ||||
-rw-r--r-- | lib/ds/plarena.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/ds/plarena.c b/lib/ds/plarena.c index 134a177f..149c09c8 100644 --- a/lib/ds/plarena.c +++ b/lib/ds/plarena.c @@ -218,7 +218,7 @@ PR_IMPLEMENT(void) PL_ArenaRelease(PLArenaPool *pool, char *mark) PLArena *a; for (a = pool->first.next; a; a = a->next) { - if (PR_UPTRDIFF(mark, a) < PR_UPTRDIFF(a->avail, a)) { + if (PR_UPTRDIFF(mark, a->base) < PR_UPTRDIFF(a->avail, a->base)) { a->avail = (PRUword)PL_ARENA_ALIGN(pool, mark); FreeArenaList(pool, a, PR_TRUE); return; diff --git a/lib/ds/plarena.h b/lib/ds/plarena.h index 1604db31..51041648 100644 --- a/lib/ds/plarena.h +++ b/lib/ds/plarena.h @@ -134,7 +134,7 @@ struct PLArenaPool { PR_BEGIN_MACRO \ char *_m = (char *)(mark); \ PLArena *_a = (pool)->current; \ - if (PR_UPTRDIFF(_m, _a) <= PR_UPTRDIFF(_a->avail, _a)) { \ + if (PR_UPTRDIFF(_m, _a->base) <= PR_UPTRDIFF(_a->avail, _a->base)) { \ _a->avail = (PRUword)PL_ARENA_ALIGN(pool, _m); \ PL_CLEAR_UNUSED(_a); \ PL_ArenaCountRetract(pool, _m); \ |