Code Review
/
trex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
5fb4729
)
CRITICAL fix for packets less than 60 bytes
author
imarom
<
[email protected]
>
Mon, 7 Mar 2016 08:00:37 +0000
(10:00 +0200)
committer
imarom
<
[email protected]
>
Mon, 7 Mar 2016 08:00:37 +0000
(10:00 +0200)
src/rpc-server/commands/trex_rpc_cmd_stream.cpp
patch
|
blob
|
history
diff --git
a/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
b/src/rpc-server/commands/trex_rpc_cmd_stream.cpp
index
cf11f8c
..
b56d3e1
100644
(file)
--- a/
src/rpc-server/commands/trex_rpc_cmd_stream.cpp
+++ b/
src/rpc-server/commands/trex_rpc_cmd_stream.cpp
@@
-81,7
+81,7
@@
TrexRpcCmdAddStream::_run(const Json::Value ¶ms, Json::Value &result) {
stream->m_pkt.len = std::max(pkt_binary.size(), 60UL);
/* allocate and init to zero ( with () ) */
- stream->m_pkt.binary = new uint8_t[
pkt_binary.size()
]();
+ stream->m_pkt.binary = new uint8_t[
stream->m_pkt.len
]();
if (!stream->m_pkt.binary) {
generate_internal_err(result, "unable to allocate memory");
}