Module: kamailio
Branch: master
Commit: 1e37b31f8a28ccc6f44eaf75e5f02e836df20411
URL:
https://github.com/kamailio/kamailio/commit/1e37b31f8a28ccc6f44eaf75e5f02e8…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2017-04-07T15:37:07+02: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
---
Modified: src/modules/pv/pv_trans.c
---
Diff:
https://github.com/kamailio/kamailio/commit/1e37b31f8a28ccc6f44eaf75e5f02e8…
Patch:
https://github.com/kamailio/kamailio/commit/1e37b31f8a28ccc6f44eaf75e5f02e8…
---
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;