CVS: beepcore-c/base/generic CBEEP.c,1.1,1.2

Chris Hanson <[email protected]> Tue, 03 Jun 2003 13:37:34 -0700
Newsgroups gmane.network.beep.beepcore.c.cvs
Message-ID <[email protected]>
Update of /cvsroot/beepcore-c/beepcore-c/base/generic
In directory sc8-pr-cvs1:/tmp/cvs-serv18751

Modified Files:
	CBEEP.c 
Log Message:
Fix a couple of null-pointer dereferences.
(patches from Sam Couter <sam _at_ couter.dropbear.id.au>)


Index: CBEEP.c
===================================================================
RCS file: /cvsroot/beepcore-c/beepcore-c/base/generic/CBEEP.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CBEEP.c	7 Sep 2002 01:15:23 -0000	1.1
--- CBEEP.c	3 Jun 2003 20:37:31 -0000	1.2
***************
*** 1,4 ****
  /*
!  * Copyright (c) 2001 Invisible Worlds, Inc.  All rights reserved.
   *
   * The contents of this file are subject to the Blocks Public License (the
--- 1,4 ----
  /*
!  * Copyright (c) 2001, 2003 Invisible Worlds, Inc.  All rights reserved.
   *
   * The contents of this file are subject to the Blocks Public License (the
***************
*** 783,786 ****
--- 783,787 ----
      frame_destroy(s->read_frame, c, s);
      s->read_frame = NULL;
+     return;
    }
  
***************
*** 1708,1714 ****
      }
    }
!   if (0 <= channel_number && c == NULL) {
!     s->status_channel = channel_number;
!     FAULT(s, -4, "blu_frame_read on closed channel");
      return NULL;
    }
--- 1709,1717 ----
      }
    }
!   if (c == NULL) {
!     if (0 <= channel_number) {
!       s->status_channel = channel_number;
!       FAULT(s, -4, "blu_frame_read on closed channel");
!     }
      return NULL;
    }



-------------------------------------------------------
This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.