plgd-dev / go-coap

Implementation of CoAP Server & Client in Go
https://coap.technology
Apache License 2.0
447 stars 116 forks source link

Clone router map before returning it to user #497

Closed HRogge closed 1 year ago

HRogge commented 1 year ago

mux/Router.GetRoutes() leaks access to the (lock-protected) internal map of the router. Clone the map before returning it to the user.

jkralik commented 1 year ago

Thx for contribution :).