소스 검색

[crypto] Return a NULL X.509 certificate if construction fails

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 년 전
부모
커밋
c923d57663
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      src/crypto/x509.c

+ 1
- 0
src/crypto/x509.c 파일 보기

@@ -1068,6 +1068,7 @@ int x509_certificate ( const void *data, size_t len,
1068 1068
 	/* Parse certificate */
1069 1069
 	if ( ( rc = x509_parse ( *cert, &cursor ) ) != 0 ) {
1070 1070
 		x509_put ( *cert );
1071
+		*cert = NULL;
1071 1072
 		return rc;
1072 1073
 	}
1073 1074
 

Loading…
취소
저장