Răsfoiți Sursa

defect 655
invalid checkpoint open flags should return ERR_BAD_FLAGS


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

Steven Dake 20 ani în urmă
părinte
comite
0f9972efb5
1 a modificat fișierele cu 4 adăugiri și 0 ștergeri
  1. 4 0
      lib/ckpt.c

+ 4 - 0
lib/ckpt.c

@@ -504,6 +504,10 @@ saCkptCheckpointOpen (
 		return (SA_AIS_ERR_INVALID_PARAM);
 	}
 
+	if (checkpointOpenFlags & ~(SA_CKPT_CHECKPOINT_READ|SA_CKPT_CHECKPOINT_WRITE|SA_CKPT_CHECKPOINT_CREATE)) {
+		return (SA_AIS_ERR_BAD_FLAGS);
+	}
+
 	error = saHandleInstanceGet (&ckptHandleDatabase, ckptHandle,
 		(void *)&ckptInstance);
 	if (error != SA_AIS_OK) {