Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
Kea
Commits
7c975ed4
Commit
7c975ed4
authored
Jan 05, 2017
by
Francis Dupont
Browse files
[master] Merged trac5101 (Coverity fixes)
parents
94e8a6e4
1726052c
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/bin/dhcp4/parser_context.cc
View file @
7c975ed4
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016
-2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -16,7 +16,7 @@ namespace isc {
namespace
dhcp
{
Parser4Context
::
Parser4Context
()
:
trace_scanning_
(
false
),
trace_parsing_
(
false
)
:
ctx_
(
NO_KEYWORD
),
trace_scanning_
(
false
),
trace_parsing_
(
false
)
{
}
...
...
src/bin/dhcp6/parser_context.cc
View file @
7c975ed4
// Copyright (C) 2016 Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2016
-2017
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -16,7 +16,7 @@ namespace isc {
namespace
dhcp
{
Parser6Context
::
Parser6Context
()
:
trace_scanning_
(
false
),
trace_parsing_
(
false
)
:
ctx_
(
NO_KEYWORD
),
trace_scanning_
(
false
),
trace_parsing_
(
false
)
{
}
...
...
src/lib/cc/data.cc
View file @
7c975ed4
// Copyright (C) 2010-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2010-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -798,11 +798,13 @@ StringElement::toJSON(std::ostream& ss) const {
break
;
default:
if
((
c
>=
0
)
&&
(
c
<
0x20
))
{
ss
<<
"
\\
u"
<<
hex
<<
setw
(
4
)
<<
setfill
(
'0'
)
<<
(
static_cast
<
unsigned
>
(
c
)
&
0xff
);
std
::
ostringstream
esc
;
esc
<<
"
\\
u"
<<
hex
<<
setw
(
4
)
<<
setfill
(
'0'
)
<<
(
static_cast
<
unsigned
>
(
c
)
&
0xff
);
ss
<<
esc
.
str
();
}
else
{
ss
<<
c
;
}
...
...
src/lib/dhcp/option_data_types.cc
View file @
7c975ed4
// Copyright (C) 2012-201
6
Internet Systems Consortium, Inc. ("ISC")
// Copyright (C) 2012-201
7
Internet Systems Consortium, Inc. ("ISC")
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
...
...
@@ -420,7 +420,12 @@ OptionDataTypeUtil::readPsid(const std::vector<uint8_t>& buf) {
// All is good, so we can convert the PSID value read from the buffer to
// the port set number.
psid
=
psid
>>
(
sizeof
(
psid
)
*
8
-
psid_len
);
if
(
psid_len
==
sizeof
(
psid
)
*
8
)
{
// Shift by 16 always gives zero (CID 1398333)
psid
=
0
;
}
else
{
psid
=
psid
>>
(
sizeof
(
psid
)
*
8
-
psid_len
);
}
return
(
std
::
make_pair
(
PSIDLen
(
psid_len
),
PSID
(
psid
)));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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