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
b5a7ff42
Commit
b5a7ff42
authored
Apr 25, 2013
by
Simon Kelley
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check length of synth-domain prefix.
parent
48fd1c4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
src/config.h
src/config.h
+4
-4
src/option.c
src/option.c
+10
-2
No files found.
src/config.h
View file @
b5a7ff42
...
@@ -279,12 +279,12 @@ HAVE_SOCKADDR_SA_LEN
...
@@ -279,12 +279,12 @@ HAVE_SOCKADDR_SA_LEN
#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY)
#if defined(INET6_ADDRSTRLEN) && defined(IPV6_V6ONLY)
# define HAVE_IPV6
# define HAVE_IPV6
# define ADDRSTRLEN INET6_ADDRSTRLEN
# define ADDRSTRLEN INET6_ADDRSTRLEN
#elif defined(INET_ADDRSTRLEN)
# undef HAVE_IPV6
# define ADDRSTRLEN INET_ADDRSTRLEN
#else
#else
# if !defined(INET_ADDRSTRLEN)
# define INET_ADDRSTRLEN 16
/* 4*3 + 3 dots + NULL */
# endif
# undef HAVE_IPV6
# undef HAVE_IPV6
# define ADDRSTRLEN
16
/* 4*3 + 3 dots + NULL */
# define ADDRSTRLEN
INET_ADDRSTRLEN
#endif
#endif
...
...
src/option.c
View file @
b5a7ff42
...
@@ -1726,7 +1726,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
...
@@ -1726,7 +1726,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
if
(
arg
)
if
(
arg
)
{
{
if
(
option
!=
's'
)
if
(
option
!=
's'
)
new
->
prefix
=
canonicalise_opt
(
arg
);
{
if
(
!
(
new
->
prefix
=
canonicalise_opt
(
arg
))
||
strlen
(
new
->
prefix
)
>
MAXLABEL
-
INET_ADDRSTRLEN
)
ret_err
(
_
(
"bad prefix"
));
}
else
if
(
strcmp
(
arg
,
"local"
)
!=
0
||
else
if
(
strcmp
(
arg
,
"local"
)
!=
0
||
(
msize
!=
8
&&
msize
!=
16
&&
msize
!=
24
))
(
msize
!=
8
&&
msize
!=
16
&&
msize
!=
24
))
ret_err
(
gen_err
);
ret_err
(
gen_err
);
...
@@ -1783,7 +1787,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
...
@@ -1783,7 +1787,11 @@ static int one_opt(int option, char *arg, char *errstr, char *gen_err, int comma
else
if
(
arg
)
else
if
(
arg
)
{
{
if
(
option
!=
's'
)
if
(
option
!=
's'
)
new
->
prefix
=
canonicalise_opt
(
arg
);
{
if
(
!
(
new
->
prefix
=
canonicalise_opt
(
arg
))
||
strlen
(
new
->
prefix
)
>
MAXLABEL
-
INET6_ADDRSTRLEN
)
ret_err
(
_
(
"bad prefix"
));
}
else
if
(
strcmp
(
arg
,
"local"
)
!=
0
||
((
msize
&
4
)
!=
0
))
else
if
(
strcmp
(
arg
,
"local"
)
!=
0
||
((
msize
&
4
)
!=
0
))
ret_err
(
gen_err
);
ret_err
(
gen_err
);
else
else
...
...
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