Fix er-coap parsing in wakaama to handle heap buffer overflows
Fix er-coap parsing in wakaama to handle heap buffer overflows

Two cases of heap buffer overflows are considered:

1. When packet length is less than the coap header length of 4 bytes
2. when the option byte lengths have values far greater than what the packet buffer capacity. In this case, especially when merging contiguous location query coap options, buffer overflow tends to occur.

Functions modified: coap_parse_message, and coap_merge_multi_option.

sunghan-chang/TizenRT,JeonginKim/TizenRT,davidfather/TizenRT,chanijjani/TizenRT,junmin-kim/TizenRT,Samsung/TizenRT,jeongchanKim/TizenRT,btheosam/TizenRT,junmin-kim/TizenRT,jeongarmy/TizenRT,jeongchanKim/TizenRT,lokeshbv/TizenRT,jsdosa/TizenRT,shivgarg/TizenRT,shivgarg/TizenRT,pillip8282/TizenRT,JeongJunSik/TizenRT,jeongchanKim/TizenRT,JeonginKim/TizenRT,sunghan-chang/TizenRT,jeongarmy/TizenRT,chanijjani/TizenRT,Samsung/TizenRT,davidfather/TizenRT,JeongJunSik/TizenRT,JeonginKim/TizenRT,Parkjihooni6186/TizenRT,shivgarg/TizenRT,an4967/TizenRT,junmin-kim/TizenRT,junmin-kim/TizenRT,JeongJunSik/TizenRT,jeongchanKim/TizenRT,pillip8282/TizenRT,pillip8282/TizenRT,jsdosa/TizenRT,btheosam/TizenRT,lokeshbv/TizenRT,junmin-kim/TizenRT,chanijjani/TizenRT,HONGCHAEHEE/TizenRT,JeonginKim/TizenRT,junmin-kim/TizenRT,lokeshbv/TizenRT,shivgarg/TizenRT,heejin-kim/TizenRT,pillip8282/TizenRT,heejin-kim/TizenRT,sunghan-chang/TizenRT,jeongchanKim/TizenRT,JeongJunSik/TizenRT,an4967/TizenRT,Samsung/TizenRT,an4967/TizenRT,Parkjihooni6186/TizenRT,jeongarmy/TizenRT,an4967/TizenRT,davidfather/TizenRT,pillip8282/TizenRT,lokeshbv/TizenRT,btheosam/TizenRT,Parkjihooni6186/TizenRT,HONGCHAEHEE/TizenRT,davidfather/TizenRT,sunghan-chang/TizenRT,shivgarg/TizenRT,JeonginKim/TizenRT,HONGCHAEHEE/TizenRT,pillip8282/TizenRT,JeonginKim/TizenRT,jsdosa/TizenRT,heejin-kim/TizenRT,lokeshbv/TizenRT,Samsung/TizenRT,Parkjihooni6186/TizenRT,btheosam/TizenRT,JeongJunSik/TizenRT,heejin-kim/TizenRT,chanijjani/TizenRT,davidfather/TizenRT,heejin-kim/TizenRT,Samsung/TizenRT,jeongarmy/TizenRT,sunghan-chang/TizenRT,jsdosa/TizenRT,jsdosa/TizenRT,HONGCHAEHEE/TizenRT,chanijjani/TizenRT,jeongchanKim/TizenRT,btheosam/TizenRT,davidfather/TizenRT,HONGCHAEHEE/TizenRT,Samsung/TizenRT,heejin-kim/TizenRT,JeongJunSik/TizenRT,an4967/TizenRT,davidfather/TizenRT,an4967/TizenRT,chanijjani/TizenRT,shivgarg/TizenRT,HONGCHAEHEE/TizenRT,sunghan-chang/TizenRT,Parkjihooni6186/TizenRT,jeongarmy/TizenRT,jsdosa/TizenRT,Samsung/TizenRT,jeongarmy/TizenRT,pillip8282/TizenRT,jeongchanKim/TizenRT,sunghan-chang/TizenRT,an4967/TizenRT,btheosam/TizenRT,junmin-kim/TizenRT,jsdosa/TizenRT,Parkjihooni6186/TizenRT,chanijjani/TizenRT,jeongarmy/TizenRT,lokeshbv/TizenRT