Răsfoiți Sursa

defect 654
wrong error code returned when checkpointSize > maxSections * maxSectionsSize in
checkpoint open.


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

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

+ 7 - 0
lib/ckpt.c

@@ -497,6 +497,13 @@ saCkptCheckpointOpen (
 		return (SA_AIS_ERR_INVALID_PARAM);
 	}
 
+	if (checkpointCreationAttributes &&
+		(checkpointCreationAttributes->checkpointSize >
+		(checkpointCreationAttributes->maxSections * checkpointCreationAttributes->maxSectionSize))) {
+
+		return (SA_AIS_ERR_INVALID_PARAM);
+	}
+
 	error = saHandleInstanceGet (&ckptHandleDatabase, ckptHandle,
 		(void *)&ckptInstance);
 	if (error != SA_AIS_OK) {