Allocate some memory for OCSP responces
This commit is contained in:
		@@ -1004,17 +1004,17 @@ hx509_ocsp_request(hx509_context context,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	es = req.tbsRequest.requestExtensions;
 | 
						es = req.tbsRequest.requestExtensions;
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	es->val = calloc(es->len, sizeof(es->val[0]));
 | 
						es->val = calloc(1, sizeof(es->val[0]));
 | 
				
			||||||
	if (es->val == NULL) {
 | 
						if (es->val == NULL) {
 | 
				
			||||||
	    ret = ENOMEM;
 | 
						    ret = ENOMEM;
 | 
				
			||||||
	    goto out;
 | 
						    goto out;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	es->len = 1;
 | 
					 | 
				
			||||||
	ret = der_copy_oid(&asn1_oid_id_pkix_ocsp_nonce, &es->val[0].extnID);
 | 
						ret = der_copy_oid(&asn1_oid_id_pkix_ocsp_nonce, &es->val[0].extnID);
 | 
				
			||||||
	if (ret) {
 | 
						if (ret) {
 | 
				
			||||||
	    free_OCSPRequest(&req);
 | 
						    free_OCSPRequest(&req);
 | 
				
			||||||
	    return ret;
 | 
						    return ret;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						es->len = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	es->val[0].extnValue.data = malloc(10);
 | 
						es->val[0].extnValue.data = malloc(10);
 | 
				
			||||||
	if (es->val[0].extnValue.data == NULL) {
 | 
						if (es->val[0].extnValue.data == NULL) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user