diff options
author | slioch <slioch@eng-140.vyatta.com> | 2008-10-07 10:30:47 -0700 |
---|---|---|
committer | slioch <slioch@eng-140.vyatta.com> | 2008-10-07 10:30:47 -0700 |
commit | d84444065bd1c05de86012910c16cdf12f95f505 (patch) | |
tree | 7d7634ae41e9b30c193969355fada5fb92ceebed /src | |
parent | 128062823ecbe45fa476ab28b145cea83cd365b9 (diff) | |
download | vyatta-cfg-d84444065bd1c05de86012910c16cdf12f95f505.tar.gz vyatta-cfg-d84444065bd1c05de86012910c16cdf12f95f505.zip |
fix for regression bug 3758. added additional check requiring opening and closing quotes before stripping takes place.
Diffstat (limited to 'src')
-rw-r--r-- | src/delete.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/delete.c b/src/delete.c index 57235d6..3011c12 100644 --- a/src/delete.c +++ b/src/delete.c @@ -82,11 +82,14 @@ static void reset_default(const char *def_val) char tmp_val[1025]; char *ptr = index(def_val,'"'); if (ptr != NULL) { - strcpy(tmp_val,ptr); + strcpy(tmp_val,ptr+1); ptr = rindex(tmp_val,'"'); if (ptr != NULL) { *ptr = '\0'; } + else { + strcpy(tmp_val,def_val); //go with original value. + } } else { strcpy(tmp_val,def_val); |