summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-07-15 18:13:23 +0200
committerGravatar Nikias Bassen2013-07-15 18:13:23 +0200
commit153fbe15c702d9c36551d84ee8cb25c4884fd701 (patch)
tree543d15a0749af781d2064b99c1463a863142f1ad /common
parent52c6680bc3c2ee2df793ccf10f7f4be97be2dae9 (diff)
downloadlibimobiledevice-153fbe15c702d9c36551d84ee8cb25c4884fd701.tar.gz
libimobiledevice-153fbe15c702d9c36551d84ee8cb25c4884fd701.tar.bz2
userpref: correctly NULL-terminate arguments in string_concat calls
Diffstat (limited to 'common')
-rw-r--r--common/userpref.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/userpref.c b/common/userpref.c
index 760eb58..23fe583 100644
--- a/common/userpref.c
+++ b/common/userpref.c
@@ -202,9 +202,9 @@ static const char *userpref_get_config_dir()
202#endif 202#endif
203 203
204 if (use_dot_config) 204 if (use_dot_config)
205 __config_dir = string_concat(base_config_dir, DIR_SEP_S, ".config", DIR_SEP_S, LIBIMOBILEDEVICE_CONF_DIR); 205 __config_dir = string_concat(base_config_dir, DIR_SEP_S, ".config", DIR_SEP_S, LIBIMOBILEDEVICE_CONF_DIR, NULL);
206 else 206 else
207 __config_dir = string_concat(base_config_dir, DIR_SEP_S, LIBIMOBILEDEVICE_CONF_DIR); 207 __config_dir = string_concat(base_config_dir, DIR_SEP_S, LIBIMOBILEDEVICE_CONF_DIR, NULL);
208 208
209 if (__config_dir) { 209 if (__config_dir) {
210 int i = strlen(__config_dir)-1; 210 int i = strlen(__config_dir)-1;