Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
a450bdef
Commit
a450bdef
authored
Jan 09, 2015
by
Thomas Rodgers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "resolve #1292 ZMQ_IDENTITY_FD does not validate option_len"
This reverts commit
45c68154
.
parent
45c68154
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
14 deletions
+0
-14
router.cpp
src/router.cpp
+0
-6
test_id2fd.cpp
tests/test_id2fd.cpp
+0
-8
No files found.
src/router.cpp
View file @
a450bdef
...
...
@@ -142,13 +142,7 @@ int zmq::router_t::xgetsockopt (int option_, const void *optval_,
*
optvallen_
=
sizeof
(
fd_t
);
return
0
;
}
if
(
optval_
&&
optvallen_
&&
*
optvallen_
)
{
if
(
*
optvallen_
<
sizeof
(
fd_t
))
{
*
optvallen_
=
sizeof
(
fd_t
);
return
EINVAL
;
}
blob_t
identity
=
blob_t
((
unsigned
char
*
)
optval_
,
*
optvallen_
);
outpipes_t
::
iterator
it
=
outpipes
.
find
(
identity
);
if
(
it
==
outpipes
.
end
()
){
...
...
tests/test_id2fd.cpp
View file @
a450bdef
...
...
@@ -61,18 +61,10 @@ int main (void)
//buffer for zmq_getsockopt / ZMQ_IDENTITY_FD
char
idbuf
[
255
];
char
failbuf
[
2
];
size_t
idbufsz
=
zmq_msg_size
(
&
part
);
size_t
failsz
=
2
;
assert
(
idbufsz
<=
255
);
memcpy
(
idbuf
,
zmq_msg_data
(
&
part
),
idbufsz
);
failbuf
[
0
]
=
idbuf
[
0
];
failbuf
[
1
]
=
0
;
// ensure that we validate buffer is sufficient to hold result
rc
=
zmq_getsockopt
(
server
,
ZMQ_IDENTITY_FD
,
failbuf
,
&
failsz
);
assert
(
rc
==
EINVAL
);
rc
=
zmq_getsockopt
(
server
,
ZMQ_IDENTITY_FD
,
idbuf
,
&
idbufsz
);
assert
(
rc
==
0
);
...
...
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