Explorar o código

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 %!s(int64=20) %!d(string=hai) anos
pai
achega
0f9972efb5
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  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) {