Skip to content

Commit

Permalink
Fix crash in PING
Browse files Browse the repository at this point in the history
Patch by Stuart Walsh, issue reported by Adam. Thanks!
  • Loading branch information
df7cb committed Nov 27, 2016
1 parent a34c57e commit af44193
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# vim: set fdm=marker ts=2 sw=2 et:

AC_PREREQ(2.59)
AC_INIT([oftc-hybrid],[1.7.2])
AC_INIT([oftc-hybrid],[1.7.3])

AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([libltdl/config])
Expand Down
2 changes: 1 addition & 1 deletion include/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
*/

#ifndef PATCHLEVEL
#define PATCHLEVEL "hybrid-7.2.2+oftc1.7.2"
#define PATCHLEVEL "hybrid-7.2.2+oftc1.7.3"
#endif
6 changes: 4 additions & 2 deletions modules/m_ping.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ m_ping(struct Client *client_p, struct Client *source_p,
return;
}

if (!EmptyString(destination) && irccmp(destination, me.name) != 0)
if (!EmptyString(destination) && irccmp(destination, me.name) != 0 &&
irccmp(destination, me.id) != 0)
{
/* We're sending it across servers.. origin == client_p->name --fl_ */
origin = client_p->name;
Expand Down Expand Up @@ -139,7 +140,8 @@ ms_ping(struct Client *client_p, struct Client *source_p,
origin = source_p->name;
destination = parv[2]; /* Will get NULL or pointer (parc >= 2!!) */

if (!EmptyString(destination) && irccmp(destination, me.name) != 0 && irccmp(destination, me.id) != 0)
if (!EmptyString(destination) && irccmp(destination, me.name) != 0 &&
irccmp(destination, me.id) != 0)
{
if ((target_p = find_server(destination)))
sendto_one(target_p,":%s PING %s :%s", parv[0],
Expand Down

0 comments on commit af44193

Please sign in to comment.