Module: kamailio Branch: master Commit: 6b1d6d046c13a0b9262a67ffc78a0e82aff03e3c URL: https://github.com/kamailio/kamailio/commit/6b1d6d046c13a0b9262a67ffc78a0e82aff03e3c
Author: Daniel-Constantin Mierla <[email protected]> Committer: Daniel-Constantin Mierla <[email protected]> Date: 2026-06-15T16:16:25+02:00 ctl: fifo server - more printed buffer size check --- Modified: src/modules/ctl/fifo_server.c --- Diff: https://github.com/kamailio/kamailio/commit/6b1d6d046c13a0b9262a67ffc78a0e82aff03e3c.diff Patch: https://github.com/kamailio/kamailio/commit/6b1d6d046c13a0b9262a67ffc78a0e82aff03e3c.patch --- diff --git a/src/modules/ctl/fifo_server.c b/src/modules/ctl/fifo_server.c index bbdaed6d120..868d2005ce9 100644 --- a/src/modules/ctl/fifo_server.c +++ b/src/modules/ctl/fifo_server.c @@ -1160,7 +1160,7 @@ static int print_value(rpc_ctx_t *ctx, char fmt, va_list *ap) case 'f': str_val.s = buf; str_val.len = snprintf(buf, 256, "%f", va_arg(*ap, double)); - if(str_val.len < 0) { + if(str_val.len < 0 || str_val.len >= (int)sizeof(buf)) { rpc_fault(ctx, 400, "Error While Converting double"); ERR("Error while converting double\n"); goto err; @@ -1551,7 +1551,7 @@ static int rpc_struct_add(struct text_chunk *s, char *fmt, ...) case 'f': st.s = buf; st.len = snprintf(buf, 256, "%f", va_arg(ap, double)); - if(st.len < 0) { + if(st.len < 0 || st.len >= (int)sizeof(buf)) { rpc_fault(ctx, 400, "Error While Converting double"); ERR("Error while converting double\n"); goto err; _______________________________________________ Kamailio - Development Mailing List -- [email protected] To unsubscribe send an email to [email protected] Important: keep the mailing list in the recipients, do not reply only to the sender!
