Mercurial > hg
changeset 1864:27c42ee4b6f0
Add a safety check to user_histo_file()
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 03 Apr 2010 20:39:06 +0200 |
parents | 2b013c0f949a |
children | e9773bd9dd2e |
files | mcabber/mcabber/histolog.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/mcabber/histolog.c Sat Apr 03 20:21:37 2010 +0200 +++ b/mcabber/mcabber/histolog.c Sat Apr 03 20:39:06 2010 +0200 @@ -54,6 +54,10 @@ if (!(UseFileLogging || FileLoadLogs)) return NULL; + if (!g_strcmp0(bjid, ".") || !g_strcmp0(bjid, "..") || + strchr(bjid, "/")) + return NULL; + lowerid = g_strdup(bjid); if (!lowerid) return NULL;