diff options
Diffstat (limited to 'net/pppd/patches/patch-ba')
-rw-r--r-- | net/pppd/patches/patch-ba | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/net/pppd/patches/patch-ba b/net/pppd/patches/patch-ba new file mode 100644 index 00000000000..0addef16a3d --- /dev/null +++ b/net/pppd/patches/patch-ba @@ -0,0 +1,30 @@ +$NetBSD: patch-ba,v 1.1.1.1 2005/01/02 02:51:43 cube Exp $ + +--- pppd/tdb.c.orig 2004-11-13 08:13:07.000000000 +0100 ++++ pppd/tdb.c +@@ -193,6 +193,8 @@ void tdb_set_lock_alarm(sig_atomic_t *pa + palarm_fired = palarm; + } + ++static int tdb_update_hash __P((TDB_CONTEXT *, TDB_DATA, u32, TDB_DATA)); ++ + /* a byte range locking function - return 0 on success + this functions locks/unlocks 1 byte at the specified offset. + +@@ -800,9 +802,13 @@ static int tdb_expand(TDB_CONTEXT *tdb, + + tdb->map_size += size; + +- if (tdb->flags & TDB_INTERNAL) +- tdb->map_ptr = realloc(tdb->map_ptr, tdb->map_size); +- else { ++ if (tdb->flags & TDB_INTERNAL) { ++ void *n; ++ n = realloc(tdb->map_ptr, tdb->map_size); ++ if (!n) ++ goto fail; ++ tdb->map_ptr = n; ++ } else { + /* + * We must ensure the file is remapped before adding the space + * to ensure consistency with systems like OpenBSD where |