You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2021/02/24 09:37:53 UTC

[GitHub] [mynewt-core] andrzej-kaczmarek commented on a change in pull request #2500: hw/sensor: fix possible null dereference in sensor_set_thresh()

andrzej-kaczmarek commented on a change in pull request #2500:
URL: https://github.com/apache/mynewt-core/pull/2500#discussion_r581803384



##########
File path: hw/sensor/src/sensor.c
##########
@@ -1970,14 +1970,15 @@ sensor_set_thresh(const char *devname, struct sensor_type_traits *stt)
     struct sensor *sensor;
     int rc;
 
+    assert(stt != NULL);

Review comment:
       you should better return error here




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org