diff options
Diffstat (limited to 'src/lib/libcrypto/conf/conf_def.c')
-rw-r--r-- | src/lib/libcrypto/conf/conf_def.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/libcrypto/conf/conf_def.c b/src/lib/libcrypto/conf/conf_def.c index b5a876ae68..2464f8ed90 100644 --- a/src/lib/libcrypto/conf/conf_def.c +++ b/src/lib/libcrypto/conf/conf_def.c | |||
@@ -613,13 +613,13 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from) | |||
613 | e++; | 613 | e++; |
614 | } | 614 | } |
615 | /* So at this point we have | 615 | /* So at this point we have |
616 | * ns which is the start of the name string which is | 616 | * np which is the start of the name string which is |
617 | * '\0' terminated. | 617 | * '\0' terminated. |
618 | * cs which is the start of the section string which is | 618 | * cp which is the start of the section string which is |
619 | * '\0' terminated. | 619 | * '\0' terminated. |
620 | * e is the 'next point after'. | 620 | * e is the 'next point after'. |
621 | * r and s are the chars replaced by the '\0' | 621 | * r and rr are the chars replaced by the '\0' |
622 | * rp and sp is where 'r' and 's' came from. | 622 | * rp and rrp is where 'r' and 'rr' came from. |
623 | */ | 623 | */ |
624 | p=_CONF_get_string(conf,cp,np); | 624 | p=_CONF_get_string(conf,cp,np); |
625 | if (rrp != NULL) *rrp=rr; | 625 | if (rrp != NULL) *rrp=rr; |
@@ -638,6 +638,11 @@ static int str_copy(CONF *conf, char *section, char **pto, char *from) | |||
638 | points at. /RL */ | 638 | points at. /RL */ |
639 | len -= e-from; | 639 | len -= e-from; |
640 | from=e; | 640 | from=e; |
641 | |||
642 | /* In case there were no braces or parenthesis around | ||
643 | the variable reference, we have to put back the | ||
644 | character that was replaced with a '\0'. /RL */ | ||
645 | *rp = r; | ||
641 | } | 646 | } |
642 | else | 647 | else |
643 | buf->data[to++]= *(from++); | 648 | buf->data[to++]= *(from++); |