mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 16:57:00 +08:00
config: expand_brackets_string tolerates null values
This commit is contained in:
@@ -38,6 +38,9 @@ unsigned expand_brackets_string(struct cfg_st *config, const char *str, subcfg_v
|
|||||||
unsigned len, len2;
|
unsigned len, len2;
|
||||||
unsigned pos = 0, finish = 0;
|
unsigned pos = 0, finish = 0;
|
||||||
|
|
||||||
|
if (str == NULL)
|
||||||
|
return 0;
|
||||||
|
|
||||||
p = strchr(str, '[');
|
p = strchr(str, '[');
|
||||||
if (p == NULL) {
|
if (p == NULL) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user