Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
18
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
d4c2a3e0
Commit
d4c2a3e0
authored
3 years ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Plain Diff
Merge branch 'hotfix-5908-5909-rc' into 'release-3.1'
5908, 5909 See merge request
!590
parents
84aa28be
67348bb1
No related branches found
No related tags found
2 merge requests
!640
Release 3.1
,
!590
5908, 5909
Pipeline
#13390
passed with stage
in 5 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/global-db/dap_chain_global_db_remote.c
+6
-1
6 additions, 1 deletion
modules/global-db/dap_chain_global_db_remote.c
modules/type/dag/dap_chain_cs_dag.c
+6
-0
6 additions, 0 deletions
modules/type/dag/dap_chain_cs_dag.c
with
12 additions
and
1 deletion
modules/global-db/dap_chain_global_db_remote.c
+
6
−
1
View file @
d4c2a3e0
...
@@ -301,7 +301,12 @@ dap_store_obj_t *dap_store_unpacket_multiple(const dap_store_obj_pkt_t *a_pkt, s
...
@@ -301,7 +301,12 @@ dap_store_obj_t *dap_store_unpacket_multiple(const dap_store_obj_pkt_t *a_pkt, s
return
NULL
;
return
NULL
;
uint64_t
l_offset
=
0
;
uint64_t
l_offset
=
0
;
uint32_t
l_count
=
a_pkt
->
obj_count
,
l_cur_count
;
uint32_t
l_count
=
a_pkt
->
obj_count
,
l_cur_count
;
dap_store_obj_t
*
l_store_obj
=
DAP_NEW_Z_SIZE
(
dap_store_obj_t
,
l_count
*
sizeof
(
struct
dap_store_obj
));
uint64_t
l_size
=
l_count
<=
UINT32_MAX
?
l_count
*
sizeof
(
struct
dap_store_obj
)
:
0
;
dap_store_obj_t
*
l_store_obj
=
DAP_NEW_Z_SIZE
(
dap_store_obj_t
,
l_size
);
if
(
!
l_store_obj
||
!
l_size
)
{
log_it
(
L_ERROR
,
"Invalid size: can't allocate %lu bytes"
,
l_size
);
return
NULL
;
}
for
(
l_cur_count
=
0
;
l_cur_count
<
l_count
;
++
l_cur_count
)
{
for
(
l_cur_count
=
0
;
l_cur_count
<
l_count
;
++
l_cur_count
)
{
dap_store_obj_t
*
l_obj
=
l_store_obj
+
l_cur_count
;
dap_store_obj_t
*
l_obj
=
l_store_obj
+
l_cur_count
;
uint16_t
l_str_length
;
uint16_t
l_str_length
;
...
...
This diff is collapsed.
Click to expand it.
modules/type/dag/dap_chain_cs_dag.c
+
6
−
0
View file @
d4c2a3e0
...
@@ -761,9 +761,15 @@ static bool s_event_verify_size(dap_chain_cs_dag_event_t *a_event, size_t a_even
...
@@ -761,9 +761,15 @@ static bool s_event_verify_size(dap_chain_cs_dag_event_t *a_event, size_t a_even
size_t
l_sign_offset
=
dap_chain_cs_dag_event_calc_size_excl_signs
(
a_event
,
a_event_size
);
size_t
l_sign_offset
=
dap_chain_cs_dag_event_calc_size_excl_signs
(
a_event
,
a_event_size
);
if
(
l_sign_offset
>=
a_event_size
)
if
(
l_sign_offset
>=
a_event_size
)
return
false
;
return
false
;
if
(
a_event
->
header
.
signs_count
>
UINT16_MAX
)
return
false
;
for
(
int
i
=
0
;
i
<
a_event
->
header
.
signs_count
;
i
++
)
{
for
(
int
i
=
0
;
i
<
a_event
->
header
.
signs_count
;
i
++
)
{
dap_sign_t
*
l_sign
=
(
dap_sign_t
*
)((
uint8_t
*
)
a_event
+
l_sign_offset
);
dap_sign_t
*
l_sign
=
(
dap_sign_t
*
)((
uint8_t
*
)
a_event
+
l_sign_offset
);
l_sign_offset
+=
dap_sign_get_size
(
l_sign
);
l_sign_offset
+=
dap_sign_get_size
(
l_sign
);
if
(
l_sign_offset
>
a_event_size
)
{
log_it
(
L_ERROR
,
"%d of atom signes don't fit in the atom size %zd"
,
a_event
->
header
.
signs_count
,
a_event_size
);
return
false
;
}
}
}
return
l_sign_offset
==
a_event_size
;
return
l_sign_offset
==
a_event_size
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment