Commit 2ec0be9e authored by Ben Laurie's avatar Ben Laurie
Browse files

Don't die if the value is NULL (Coverity CID 98).

parent c2d1c2d3
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -214,6 +214,7 @@ void ERR_load_CONF_strings(void);
#define CONF_F_CONF_LOAD_BIO				 102
#define CONF_F_CONF_LOAD_FP				 103
#define CONF_F_CONF_MODULES_LOAD			 116
#define CONF_F_CONF_PARSE_LIST				 119
#define CONF_F_DEF_LOAD					 120
#define CONF_F_DEF_LOAD_BIO				 121
#define CONF_F_MODULE_INIT				 115
@@ -233,6 +234,7 @@ void ERR_load_CONF_strings(void);

/* Reason codes. */
#define CONF_R_ERROR_LOADING_DSO			 110
#define CONF_R_LIST_CANNOT_BE_NULL			 115
#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET		 100
#define CONF_R_MISSING_EQUAL_SIGN			 101
#define CONF_R_MISSING_FINISH_FUNCTION			 111
+3 −1
Original line number Diff line number Diff line
/* crypto/conf/conf_err.c */
/* ====================================================================
 * Copyright (c) 1999-2006 The OpenSSL Project.  All rights reserved.
 * Copyright (c) 1999-2007 The OpenSSL Project.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
@@ -75,6 +75,7 @@ static ERR_STRING_DATA CONF_str_functs[]=
{ERR_FUNC(CONF_F_CONF_LOAD_BIO),	"CONF_load_bio"},
{ERR_FUNC(CONF_F_CONF_LOAD_FP),	"CONF_load_fp"},
{ERR_FUNC(CONF_F_CONF_MODULES_LOAD),	"CONF_modules_load"},
{ERR_FUNC(CONF_F_CONF_PARSE_LIST),	"CONF_parse_list"},
{ERR_FUNC(CONF_F_DEF_LOAD),	"DEF_LOAD"},
{ERR_FUNC(CONF_F_DEF_LOAD_BIO),	"DEF_LOAD_BIO"},
{ERR_FUNC(CONF_F_MODULE_INIT),	"MODULE_INIT"},
@@ -97,6 +98,7 @@ static ERR_STRING_DATA CONF_str_functs[]=
static ERR_STRING_DATA CONF_str_reasons[]=
	{
{ERR_REASON(CONF_R_ERROR_LOADING_DSO)    ,"error loading dso"},
{ERR_REASON(CONF_R_LIST_CANNOT_BE_NULL)  ,"list cannot be null"},
{ERR_REASON(CONF_R_MISSING_CLOSE_SQUARE_BRACKET),"missing close square bracket"},
{ERR_REASON(CONF_R_MISSING_EQUAL_SIGN)   ,"missing equal sign"},
{ERR_REASON(CONF_R_MISSING_FINISH_FUNCTION),"missing finish function"},
+7 −1
Original line number Diff line number Diff line
@@ -581,8 +581,14 @@ int CONF_parse_list(const char *list_, int sep, int nospc,
	{
	int ret;
	const char *lstart, *tmpend, *p;
	lstart = list_;

	if(list_ == NULL)
		{
		CONFerr(CONF_F_CONF_PARSE_LIST, CONF_R_LIST_CANNOT_BE_NULL);
		return 0;
		}

	lstart = list_;
	for(;;)
		{
		if (nospc)