Răsfoiți Sursa

defect 680
ckptsectionoverwrite should return INVALID if dataSize greater then
maxSections * maxSectionsSize


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

Steven Dake 20 ani în urmă
părinte
comite
2bdc4e356c
1 a modificat fișierele cu 5 adăugiri și 0 ștergeri
  1. 5 0
      exec/ckpt.c

+ 5 - 0
exec/ckpt.c

@@ -2476,6 +2476,11 @@ static int message_handler_req_exec_ckpt_sectionoverwrite (void *message, struct
 		goto error_exit;
 	}
 
+	if (ckptCheckpoint->checkpointCreationAttributes.maxSectionSize < req_lib_ckpt_sectionoverwrite->dataSize) {
+		error = SA_AIS_ERR_INVALID_PARAM;
+		goto error_exit;
+	}
+
 	/*
 	 * Find checkpoint section to be overwritten
 	 */