Prevent out-of-bounds memory access
prevent the snprintf function from accessing outside the
queryParam char array.
If the resulting uri exceeds the max uri length indicate the
failure by returning OC_STACK_INVALID_URI from the function.
Found using static analysis tool.
Change-Id: I81ee4cc932c70942ff65dcf8390529279e36dc4a
Signed-off-by: George Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15173
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Dan Mihai <Daniel.Mihai@microsoft.com>