Parcourir la source

defect 631
Fix segfault if null pointer passed to selection object address of
saCkptSelectionObjectGet

(Logical change 1.212)


git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@680 fd59a12c-fef9-0310-b244-a6a79926bd2f

Steven Dake il y a 20 ans
Parent
commit
4e4e0ebaf1
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  1. 3 0
      lib/ckpt.c

+ 3 - 0
lib/ckpt.c

@@ -219,6 +219,9 @@ saCkptSelectionObjectGet (
 	struct ckptInstance *ckptInstance;
 	SaAisErrorT error;
 
+	if (selectionObject == NULL) {
+		return (SA_AIS_ERR_INVALID_PARAM);
+	}
 	error = saHandleInstanceGet (&ckptHandleDatabase, ckptHandle, (void *)&ckptInstance);
 	if (error != SA_AIS_OK) {
 		return (error);