diff options
author | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-14 21:11:49 +0000 |
---|---|---|
committer | markw <markw@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-14 21:11:49 +0000 |
commit | cdeec02fc7caa5801f5b5ed6385238d68f4201a4 (patch) | |
tree | 50aca30d243515ae783da0d4c06d2d18a067c164 /sed.c | |
parent | a5217673f84f17bce67c5872324e580040e4b4a1 (diff) | |
download | busybox-w32-cdeec02fc7caa5801f5b5ed6385238d68f4201a4.tar.gz busybox-w32-cdeec02fc7caa5801f5b5ed6385238d68f4201a4.tar.bz2 busybox-w32-cdeec02fc7caa5801f5b5ed6385238d68f4201a4.zip |
Applied patch from Erik Habbinga to fix a problem with an uninitialized
substitution delimiter.
git-svn-id: svn://busybox.net/trunk/busybox@2082 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sed.c')
-rw-r--r-- | sed.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -154,6 +154,9 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege | |||
154 | { | 154 | { |
155 | char *my_str = strdup(str); | 155 | char *my_str = strdup(str); |
156 | int idx = 0; | 156 | int idx = 0; |
157 | char olddelimiter; | ||
158 | olddelimiter = sed_cmd->delimiter; | ||
159 | sed_cmd->delimiter = '/'; | ||
157 | 160 | ||
158 | if (isdigit(my_str[idx])) { | 161 | if (isdigit(my_str[idx])) { |
159 | do { | 162 | do { |
@@ -182,6 +185,7 @@ static int get_address(struct sed_cmd *sed_cmd, const char *str, int *line, rege | |||
182 | } | 185 | } |
183 | 186 | ||
184 | free(my_str); | 187 | free(my_str); |
188 | sed_cmd->delimiter = olddelimiter; | ||
185 | return idx; | 189 | return idx; |
186 | } | 190 | } |
187 | 191 | ||