Kaynağa Gözat

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)
Daniel-Constantin Mierla 8 yıl önce
ebeveyn
işleme
dccca1959b
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      src/modules/pv/pv_trans.c

+ 1 - 1
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;