Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Dnsmasq
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
Dnsmasq
Commits
00cd9d55
Commit
00cd9d55
authored
Oct 02, 2014
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crash at startup when an empty suffix is supplied to --conf-dir
parent
f2658275
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
15 deletions
+29
-15
CHANGELOG
CHANGELOG
+6
-0
src/option.c
src/option.c
+23
-15
No files found.
CHANGELOG
View file @
00cd9d55
version 2.73
Fix crash at startup when an empty suffix is supplied to
--conf-dir, also trivial memory leak. Thanks to
Tomas Hozza for spotting this.
version 2.72
Add ra-advrouter mode, for RFC-3775 mobile IPv6 support.
...
...
src/option.c
View file @
00cd9d55
...
...
@@ -1474,22 +1474,25 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
for
(
arg
=
comma
;
arg
;
arg
=
comma
)
{
comma
=
split
(
arg
);
li
=
opt_malloc
(
sizeof
(
struct
list
));
if
(
*
arg
==
'*'
)
if
(
strlen
(
arg
)
!=
0
)
{
li
->
next
=
match_suffix
;
match_suffix
=
li
;
/* Have to copy: buffer is overwritten */
li
->
suffix
=
opt_string_alloc
(
arg
+
1
);
}
else
{
li
->
next
=
ignore_suffix
;
ignore_suffix
=
li
;
/* Have to copy: buffer is overwritten */
li
->
suffix
=
opt_string_alloc
(
arg
);
li
=
opt_malloc
(
sizeof
(
struct
list
));
if
(
*
arg
==
'*'
)
{
li
->
next
=
match_suffix
;
match_suffix
=
li
;
/* Have to copy: buffer is overwritten */
li
->
suffix
=
opt_string_alloc
(
arg
+
1
);
}
else
{
li
->
next
=
ignore_suffix
;
ignore_suffix
=
li
;
/* Have to copy: buffer is overwritten */
li
->
suffix
=
opt_string_alloc
(
arg
);
}
}
}
;
}
if
(
!
(
dir_stream
=
opendir
(
directory
)))
die
(
_
(
"cannot access directory %s: %s"
),
directory
,
EC_FILE
);
...
...
@@ -1555,7 +1558,12 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
free
(
ignore_suffix
->
suffix
);
free
(
ignore_suffix
);
}
for
(;
match_suffix
;
match_suffix
=
li
)
{
li
=
match_suffix
->
next
;
free
(
match_suffix
->
suffix
);
free
(
match_suffix
);
}
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment