summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2005-12-30 21:25:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:49:05 -0500
commit5a26b2d72b63f0b3d8d4aa151044521fdf8c2064 (patch)
tree5cc746272ccfa6d6b4729ef46b1137c6149ea3fa
parent905c3ff8e1e63f2151f63552e556086968424118 (diff)
downloadsamba-5a26b2d72b63f0b3d8d4aa151044521fdf8c2064.tar.gz
samba-5a26b2d72b63f0b3d8d4aa151044521fdf8c2064.tar.bz2
samba-5a26b2d72b63f0b3d8d4aa151044521fdf8c2064.zip
r12619: make sure we don't return more than 25 addresses, as w2k3 crashes in that case
I still need to make sure we didn't write such records to our database... metze (This used to be commit d0dc0ffa3160041e137b629b4dbbe821044edfe3)
-rw-r--r--source4/nbt_server/wins/winsdb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/nbt_server/wins/winsdb.c b/source4/nbt_server/wins/winsdb.c
index 47abcd4a63..9131a70c07 100644
--- a/source4/nbt_server/wins/winsdb.c
+++ b/source4/nbt_server/wins/winsdb.c
@@ -479,6 +479,10 @@ NTSTATUS winsdb_record(struct winsdb_handle *h, struct ldb_message *msg, TALLOC_
goto failed;
}
}
+ if (num_values > 25) {
+ status = NT_STATUS_INTERNAL_DB_CORRUPTION;
+ goto failed;
+ }
rec->addresses = talloc_array(rec, struct winsdb_addr *, num_values+1);
if (rec->addresses == NULL) {