Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
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
Esteban Blanc
proview
Commits
f69b2685
Commit
f69b2685
authored
Feb 05, 2018
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sev server histdata message size fix
parent
3eebaca2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
sev/exe/sev_server/src/sev_server.cpp
sev/exe/sev_server/src/sev_server.cpp
+7
-4
No files found.
sev/exe/sev_server/src/sev_server.cpp
View file @
f69b2685
...
...
@@ -904,6 +904,7 @@ int sev_server::receive_histdata( sev_sMsgHistDataStore *msg, unsigned int size,
else
{
sev_sThread
*
th
;
sev_sQMsgHistData
*
qmsg
;
int
qmsg_size
;
pwr_tUInt32
key
;
if
(
m_thread_key_node
)
...
...
@@ -925,11 +926,12 @@ int sev_server::receive_histdata( sev_sMsgHistDataStore *msg, unsigned int size,
return
1
;
}
qmsg
=
(
sev_sQMsgHistData
*
)
malloc
(
sizeof
(
*
qmsg
)
-
sizeof
(
qmsg
->
data
)
+
size
);
memcpy
(
&
qmsg
->
data
,
dp
,
size
);
qmsg_size
=
size
+
(
sizeof
(
*
qmsg
)
-
sizeof
(
qmsg
->
data
))
-
(
sizeof
(
*
msg
)
-
sizeof
(
msg
->
Data
));
qmsg
=
(
sev_sQMsgHistData
*
)
malloc
(
qmsg_size
);
memcpy
(
&
qmsg
->
data
,
dp
,
qmsg_size
-
(
sizeof
(
*
qmsg
)
-
sizeof
(
qmsg
->
data
)));
qmsg
->
h
.
type
=
sev_eQMsgType_HistData
;
qmsg
->
h
.
version
=
msg
->
Version
;
qmsg
->
h
.
size
=
size
;
qmsg
->
h
.
size
=
qmsg_
size
;
qmsg
->
time
=
msg
->
Time
;
lst_Init
(
NULL
,
&
qmsg
->
h
.
e
,
qmsg
);
...
...
@@ -1450,12 +1452,13 @@ void *sev_server::receive_histdata_thread( void *arg)
case
sev_eQMsgType_HistData
:
{
sev_sHistData
*
dp
;
sev_sQMsgHistData
*
msg
=
(
sev_sQMsgHistData
*
)
qmsg
;
int
data_size
=
msg
->
h
.
size
-
(
sizeof
(
*
msg
)
-
sizeof
(
msg
->
data
));
dp
=
(
sev_sHistData
*
)
&
msg
->
data
;
sev
->
m_db
->
begin_transaction
(
th
->
db_ctx
);
while
(
(
char
*
)
dp
-
(
char
*
)
msg
<
(
int
)
msg
->
h
.
size
)
{
while
(
(
char
*
)
dp
-
(
char
*
)
msg
->
data
<
data_
size
)
{
sev_sRefid
*
rp
;
pwr_tRefId
rk
=
dp
->
sevid
;
...
...
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