Преглед изворни кода

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 година
родитељ
комит
dccca1959b
1 измењених фајлова са 1 додато и 1 уклоњено
  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;