From 5626d0b535480de0efa19daae4431063b56f588a Mon Sep 17 00:00:00 2001 From: Andrey Volk Date: Thu, 20 Jul 2017 23:38:44 +0300 Subject: [PATCH] FS-10064: [mod_managed] Fix compile on windows. --- src/include/switch_utils.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/include/switch_utils.h b/src/include/switch_utils.h index 057e0c58b4..5a57525577 100644 --- a/src/include/switch_utils.h +++ b/src/include/switch_utils.h @@ -57,7 +57,9 @@ static inline char *switch_get_hex_bytes(switch_byte_t *buf, switch_size_t datal pp = new_buf; for (p = buf; p < e && pp < ee - 4; p++) { - snprintf(pp, 4, "%.2x ", (int)*p); + if (snprintf(pp, 4, "%.2x ", (int)*p) < 0) { + return NULL; + } pp += 3; } *(pp-1) = '\0';