Skip to content

Issue 10094 #10327

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed

Conversation

satyacube
Copy link
Contributor

subsys: net: Null pointer dereferences

Check for NULL IPv6 addr values from net_if_ipv6_get_ll() in rpl.c
If NULL, print a debug statement

Fixes #10094.

Signed-off-by: Satya Bhattacharya [email protected]

Check the return value of close() in socket_dumb_http.c
If non-zero, print the error code

Fixes zephyrproject-rtos#8413.

Signed-off-by: Satya Bhattacharya <[email protected]>
Check for NULL IPv6 addr values from net_if_ipv6_get_ll() in rpl.c
If NULL, print a debug statement

Fixes zephyrproject-rtos#10094.

Signed-off-by: Satya Bhattacharya <[email protected]>
@codecov-io
Copy link

codecov-io commented Oct 2, 2018

Codecov Report

Merging #10327 into master will increase coverage by 0.05%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10327      +/-   ##
==========================================
+ Coverage   53.19%   53.24%   +0.05%     
==========================================
  Files         209      209              
  Lines       25630    25631       +1     
  Branches     5537     5538       +1     
==========================================
+ Hits        13633    13647      +14     
+ Misses       9801     9788      -13     
  Partials     2196     2196
Impacted Files Coverage Δ
subsys/net/ip/rpl.c 14.18% <0%> (-0.01%) ⬇️
lib/posix/clock.c 72.22% <0%> (+38.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d332ae5...b631a0d. Read the comment docs.


if (addr) {
net_rpl_dio_send(rpl_default_iface, instance, addr,
NULL);
#if defined(CONFIG_NET_STATISTICS_RPL)
instance->dio_send_pkt++;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please indent this line

#if defined(CONFIG_NET_STATISTICS_RPL)
instance->dio_send_pkt++;
#endif
} else {
NET_DBG("Sending DIO failed, IPv6 link local "
"address is NULL");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to resubmit with instance->dio_next_delay parameter in this case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IF addr is NULL should we?

k_delayed_work_submit(&instance->dio_timer, DIO_TIMEOUT); return;

@@ -635,12 +635,16 @@ static void dio_timer(struct k_work *work)
net_if_ipv6_get_ll(rpl_default_iface,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the subsys: from "subsys:net: Null pointer dereferences" commit subject, it should be "net: rpl: Null pointer dereferences" instead.

Also add Coverity id to commit body, the syntax is "Coverity-CID: xxxxx"

@@ -46,6 +46,7 @@ int main(void)
int serv;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The patch "samples: net: Check the return value of close()" is already applied, you can remove it from this PR.

Check for NULL IPv6 addr values from net_if_ipv6_get_ll() in rpl.c
If NULL, print a debug statement

Fixes zephyrproject-rtos#10094.

Signed-off-by: Satya Bhattacharya <[email protected]>
@satyacube satyacube closed this Oct 3, 2018
@satyacube satyacube deleted the issue_10094 branch October 3, 2018 23:42
@jukkar
Copy link
Member

jukkar commented Oct 10, 2018

Not sure what happened here and why this PR was closed, your patch was almost there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants