Module: kamailio
Branch: 5.0
Commit: dccca1959b6f96bb508baa9dab0eacba7c69f20c
URL:
https://github.com/kamailio/kamailio/commit/dccca1959b6f96bb508baa9dab0eacb…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: 2017-04-08T09:02:38+03:00
pv: declare the pv_empty as buffer with size
- otherwise it can crash when code tries to write in it, if pointing to
static empty string
- reported by Juha Heinanen
(cherry picked from commit 1e37b31f8a28ccc6f44eaf75e5f02e836df20411)
---
Modified: src/modules/pv/pv_trans.c
---
Diff:
https://github.com/kamailio/kamailio/commit/dccca1959b6f96bb508baa9dab0eacb…
Patch:
https://github.com/kamailio/kamailio/commit/dccca1959b6f96bb508baa9dab0eacb…
---
diff --git a/src/modules/pv/pv_trans.c b/src/modules/pv/pv_trans.c
index 6ad9a97..25723bd 100644
--- a/src/modules/pv/pv_trans.c
+++ b/src/modules/pv/pv_trans.c
@@ -50,7 +50,7 @@
#include "pv_trans.h"
-static char _empty_str[] = "";
+static char _empty_str[2] = {0};
static str _tr_empty = { _empty_str, 0 };
static str _tr_uri = {0, 0};
static struct sip_uri _tr_parsed_uri;