Просмотр исходного кода

defect 790
if sectionDescriptor is null in iteration next call, segfault occurs


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

Steven Dake 20 лет назад
Родитель
Сommit
2db57a7bf5
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      lib/ckpt.c

+ 4 - 0
lib/ckpt.c

@@ -1328,6 +1328,10 @@ saCkptSectionIterationNext (
 	struct res_lib_ckpt_sectioniteratornext res_lib_ckpt_sectioniteratornext;
 	struct iteratorSectionIdListEntry *iteratorSectionIdListEntry;
 
+	if (sectionDescriptor == NULL) {
+		return (SA_AIS_ERR_INVALID_PARAM);
+	}
+
 	error = saHandleInstanceGet (&ckptSectionIterationHandleDatabase,
 		sectionIterationHandle, (void *)&ckptSectionIterationInstance);
 	if (error != SA_AIS_OK) {