Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
contiki-ng
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package 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
NATAF Emmanuel
contiki-ng
Commits
97fe4ab2
Commit
97fe4ab2
authored
3 years ago
by
Peter A. Jonsson
Browse files
Options
Downloads
Patches
Plain Diff
sicslowpan: use unsigned types
This fixes some -Wsign-compare warnings which is included in -Wextra.
parent
fbd0a0c1
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
os/net/ipv6/sicslowpan.c
+3
-3
3 additions, 3 deletions
os/net/ipv6/sicslowpan.c
with
3 additions
and
3 deletions
os/net/ipv6/sicslowpan.c
+
3
−
3
View file @
97fe4ab2
...
...
@@ -434,7 +434,7 @@ copy_frags2uip(int context)
for
(
i
=
0
;
i
<
SICSLOWPAN_FRAGMENT_BUFFERS
;
i
++
)
{
/* And also copy all matching fragments */
if
(
frag_buf
[
i
].
len
>
0
&&
frag_buf
[
i
].
index
==
context
)
{
if
((
frag_buf
[
i
].
offset
<<
3
)
+
frag_buf
[
i
].
len
>
sizeof
(
uip_buf
))
{
if
((
(
size_t
)
frag_buf
[
i
].
offset
<<
3
)
+
frag_buf
[
i
].
len
>
sizeof
(
uip_buf
))
{
LOG_WARN
(
"input: invalid fragment offset
\n
"
);
clear_fragments
(
context
);
return
false
;
...
...
@@ -2026,12 +2026,12 @@ input(void)
/* Sanity-check size of incoming packet to avoid buffer overflow */
{
int
req_size
=
uncomp_hdr_len
+
(
uint16_t
)(
frag_offset
<<
3
)
unsigned
int
req_size
=
uncomp_hdr_len
+
(
uint16_t
)(
frag_offset
<<
3
)
+
packetbuf_payload_len
;
if
(
req_size
>
sizeof
(
uip_buf
))
{
#if SICSLOWPAN_CONF_FRAG
LOG_ERR
(
"input: packet and fragment context %u dropped, minimum required IP_BUF size: %d+%d+%d=%
d
(current size: %u)
\n
"
,
"input: packet and fragment context %u dropped, minimum required IP_BUF size: %d+%d+%d=%
u
(current size: %u)
\n
"
,
frag_context
,
uncomp_hdr_len
,
(
uint16_t
)(
frag_offset
<<
3
),
packetbuf_payload_len
,
req_size
,
(
unsigned
)
sizeof
(
uip_buf
));
...
...
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