Skip malformed entries in abots.sav, which avoids two null dereferences found by Coverity.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@250 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-06-28 05:22:20 +00:00
parent 7a5448aa74
commit ee761e7f02
2 changed files with 7 additions and 0 deletions

View File

@@ -1,5 +1,8 @@
[Changes 1.2c01]
* Skip malformed abots.sav entries in read_abot(), avoiding null
dereferences found by Coverity. (flashback)
* Ensure proper handling of % when /FSET DCC is used. (caf)
* Improve robustness of CDCC save file loading. (caf)

View File

@@ -198,8 +198,12 @@ UserList *new;
chop(buffer, 1);
u = buffer;
h = strchr(u, '!');
if (!h)
continue;
*h++ = 0;
p = strchr(h, ',');
if (!p)
continue;
*p++ = 0;
if ((c = strchr(p, ',')))
*c++ = 0;