Browse Source

return SA_AIS_ERR_INVALID_PARAM when vector ptr is NULL or len equal to 0

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1225 fd59a12c-fef9-0310-b244-a6a79926bd2f
Fabien Thomas 19 years ago
parent
commit
c5b004ad05
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lib/ckpt.c

+ 2 - 0
lib/ckpt.c

@@ -1500,10 +1500,12 @@ saCkptCheckpointWrite (
 	for (i = 0; i < numberOfElements; i++) {
 		if (ioVector[i].dataSize == 0) {
 			*erroneousVectorIndex = i;
+			error = SA_AIS_ERR_INVALID_PARAM;
 			goto error_put;
 		}
 		if (ioVector[i].dataBuffer == NULL) {
 			*erroneousVectorIndex = i;
+			error = SA_AIS_ERR_INVALID_PARAM;
 			goto error_put;
 		}
 	}