From: Jeffrey Altman Date: Fri, 20 Jul 2012 14:20:02 +0000 (-0400) Subject: rx: fix abort on missing service X-Git-Tag: upstream/1.6.2_pre2^2~89 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=21ae26a93d0b9a3cd81c1b13af8bd3f82ae0d0cc;p=packages%2Fo%2Fopenafs.git rx: fix abort on missing service patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the possibility that a NULL connection pointer could be dereferenced. Prevent it. Reviewed-on: http://gerrit.openafs.org/7794 Tested-by: BuildBot Reviewed-by: Jeffrey Altman (cherry picked from commit 3ec1bdf9c74bd250d49065fa84475a5123461744) Change-Id: I1e01005a34e5d373b6810052d94fac8d96f40e4f Reviewed-on: http://gerrit.openafs.org/8371 Reviewed-by: Jeffrey Altman Tested-by: BuildBot --- diff --git a/src/rx/rx.c b/src/rx/rx.c index d3872c997..f35bf837f 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -3173,10 +3173,11 @@ rxi_ReceivePacket(struct rx_packet *np, osi_socket socket, /* To avoid having 2 connections just abort at each other, don't abort an abort. */ - if (!conn && (np->header.type != RX_PACKET_TYPE_ABORT)) { - rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION, - np, 0); - return np; + if (!conn) { + if (np->header.type != RX_PACKET_TYPE_ABORT) + rxi_SendRawAbort(socket, host, port, RX_INVALID_OPERATION, + np, 0); + return np; } /* If the connection is in an error state, send an abort packet and ignore