Azure / azure-ulib-c

THIS REPO IS CURRENTLY IN PREVIEW. THE APIs ARE NOT FINAL AND ARE SUBJECT TO CHANGE WITHOUT NOTICE. Azure utility library used in embedded and constrained devices.
MIT License
14 stars 6 forks source link

Use strncmp on az_ulib_ipc.get_interface #42

Open mamokarz opened 4 years ago

mamokarz commented 4 years ago

The function get_interface is using strcmp to compare the interface name. Because both strings are hard-coded, it does not represent any threat for the system. But if in some point we accept interface request from the network, it may result in segfault of memory leak.

We need to decide if we will protect against this possible threat on this level or in an upper layer. And after that fix the code if needed.