[libpri-commits] mattf: branch mattf/libpri-1.4-ntptmp r1034 - /team/mattf/libpri-1.4-ntptmp/

SVN commits to the libpri project libpri-commits at lists.digium.com
Wed Aug 26 13:47:51 CDT 2009


Author: mattf
Date: Wed Aug 26 13:47:48 2009
New Revision: 1034

URL: http://svn.asterisk.org/svn-view/libpri?view=rev&rev=1034
Log:
Make sure we don't dereference a null pointer when it's passed in

Modified:
    team/mattf/libpri-1.4-ntptmp/pri_internal.h

Modified: team/mattf/libpri-1.4-ntptmp/pri_internal.h
URL: http://svn.asterisk.org/svn-view/libpri/team/mattf/libpri-1.4-ntptmp/pri_internal.h?view=diff&rev=1034&r1=1033&r2=1034
==============================================================================
--- team/mattf/libpri-1.4-ntptmp/pri_internal.h (original)
+++ team/mattf/libpri-1.4-ntptmp/pri_internal.h Wed Aug 26 13:47:48 2009
@@ -298,9 +298,13 @@
 static inline struct pri * PRI_MASTER(struct pri *mypri)
 {
 	struct pri *pri = mypri;
+	
+	if (!pri)
+		return NULL;
 
 	while (pri->master)
 		pri = pri->master;
+
 	return pri;
 }
 




More information about the libpri-commits mailing list