From 2b6f6c54bba3ab397f0e83f9d5e9faee905ac559 Mon Sep 17 00:00:00 2001 From: dot11monk Date: Mon, 28 Jun 2021 10:31:44 +0530 Subject: [PATCH] Fixed stack-buffer-overflow in metric_len --- src/ncp-spinel/SpinelNCPInstance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncp-spinel/SpinelNCPInstance.cpp b/src/ncp-spinel/SpinelNCPInstance.cpp index e6d68add..fee0f0af 100644 --- a/src/ncp-spinel/SpinelNCPInstance.cpp +++ b/src/ncp-spinel/SpinelNCPInstance.cpp @@ -2177,7 +2177,7 @@ unpack_link_metrics_as_val_map(const uint8_t *data_in, spinel_size_t data_len, V spinel_ssize_t len; uint8_t metric_type; uint8_t *metric_ptr = NULL; - uint16_t metric_len = 0; + uint32_t metric_len = 0; int ret = kWPANTUNDStatus_Failure; while (data_len > 0) {