Bail out of check_auto_reply() early if auto_str is NULL. This fixes a

crash after /SETAR -.

Reported by riderplus.


git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@234 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Kevin Easton
2013-03-01 12:33:00 +00:00
parent 17e3a91f03
commit 73269ea887
2 changed files with 27 additions and 25 deletions

View File

@@ -1,5 +1,7 @@
[Changes 1.2c01]
* Fix crash after /SETAR -, reported by riderplus. (caf)
* Remove special handling of 484 numeric, which is no longer needed and
was buggy (making BitchX think that usermode +G was set). (caf)

View File

@@ -136,11 +136,11 @@ int check_auto_reply(char *str)
{
char *p = NULL;
char *pat;
if (!str || !*str || !get_int_var(AUTO_RESPONSE_VAR))
if (!str || !*str || !get_int_var(AUTO_RESPONSE_VAR) || !auto_str)
return 0;
p = LOCAL_COPY(auto_str);
if (p && *p)
{
while ((pat = next_arg(p, &p)))
{
switch(get_int_var(NICK_COMPLETION_TYPE_VAR))
@@ -164,7 +164,7 @@ char *pat;
continue;
}
}
}
return 0;
found_auto:
#ifdef GUI