r12619: make sure we don't return more than 25 addresses, as w2k3 crashes in that...
authorStefan Metzmacher <metze@samba.org>
Fri, 30 Dec 2005 21:25:38 +0000 (21:25 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:49:05 +0000 (13:49 -0500)
I still need to make sure we didn't write such records to our database...

metze

source/nbt_server/wins/winsdb.c

index 47abcd4a630b3f3e582e104c940ef1270f0a4037..9131a70c0762f3ec0bdeea962f7a9602ac9e64ed 100644 (file)
@@ -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) {