f4a592c4f0364d35068bca9f2634946750340356
If ptr[0] is NULL, then strchr may return a pointer to the NULL
terminator for serv->nick_prefixes, making the if statement true, which
then leads to the pointer increment leaving ptr oob. Now we check to
ensure ptr[0] != NULL.
From the Linux manpages for strchr:
The terminating null byte is considered part of the string, so that if c is
specified as '\0', these functions return a pointer to the terminator.
HexChat

HexChat is an IRC client for Windows and UNIX-like operating systems.
See IRCHelp.org for information about IRC in general.
For more information on HexChat please read our documentation:
X-Chat ("xchat") Copyright (c) 1998-2010 By Peter Zelezny. HexChat ("hexchat") Copyright (c) 2009-2014 By Berke Viktor. This program is released under the GPL v2 with the additional exemption that compiling, linking, and/or using OpenSSL is allowed. You may provide binary packages linked to the OpenSSL libraries, provided that all other requirements of the GPL are met. See file COPYING for details.
Languages
C
93.2%
Python
1.7%
Perl
1.5%
Meson
1.3%
C#
0.9%
Other
1.2%