The branch, v3-0-test has been updated
       via  b214365ec32c1904ea763cccd0b2b49f5f6f0869 (commit)
      from  20971d829d7ae2c1b31ebc872da787f3467fa6b0 (commit)

http://gitweb.samba.org/?samba.git;a=shortlog;h=v3-0-test


- Log -----------------------------------------------------------------
commit b214365ec32c1904ea763cccd0b2b49f5f6f0869
Author: Jeremy Allison <[EMAIL PROTECTED]>
Date:   Fri Feb 29 06:55:48 2008 -0800

    Patch to fix the "Invalid read of size 4" errors. Bug #3617.
    Jeremy.

-----------------------------------------------------------------------

Summary of changes:
 source/nmbd/nmbd_responserecordsdb.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/nmbd/nmbd_responserecordsdb.c 
b/source/nmbd/nmbd_responserecordsdb.c
index 8b056ac..dc16a07 100644
--- a/source/nmbd/nmbd_responserecordsdb.c
+++ b/source/nmbd/nmbd_responserecordsdb.c
@@ -47,6 +47,24 @@ static void add_response_record(struct subnet_record *subrec,
 void remove_response_record(struct subnet_record *subrec,
                                struct response_record *rrec)
 {
+       /* It is possible this can be called twice,
+          with a rrec pointer that has been freed. So
+          before we inderect into rrec, search for it
+          on the responselist first. Bug #3617. JRA. */
+
+       struct response_record *p = NULL;
+
+       for (p = subrec->responselist; p; p = p->next) {
+               if (p == rrec) {
+                       break;
+               }
+       }
+
+       if (p == NULL) {
+               /* We didn't find rrec on the list. */
+               return;
+       }
+
        DLIST_REMOVE(subrec->responselist, rrec);
 
        if(rrec->userdata) {


-- 
Samba Shared Repository

Reply via email to