Browse Source

defect 682
null iovector caues checkpointRead to segfault



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

Steven Dake 20 năm trước cách đây
mục cha
commit
43806fe78e
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      lib/ckpt.c

+ 4 - 0
lib/ckpt.c

@@ -1475,6 +1475,10 @@ saCkptCheckpointRead (
 	int i;
 	int i;
 	struct iovec iov[3];
 	struct iovec iov[3];
 
 
+	if (ioVector == NULL) {
+		return (SA_AIS_ERR_INVALID_PARAM);
+	}
+
 	error = saHandleInstanceGet (&checkpointHandleDatabase, checkpointHandle,
 	error = saHandleInstanceGet (&checkpointHandleDatabase, checkpointHandle,
 		(void *)&ckptCheckpointInstance);
 		(void *)&ckptCheckpointInstance);
 	if (error != SA_AIS_OK) {
 	if (error != SA_AIS_OK) {