mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 21:47:45 +00:00
STABLE14-callpostamble-deal-with-null-host-20060905
FIXES 38566 don't dereference garbage when no host was set (cherry picked from commit 56bbd155db6941d915cf199f6e23cccfeb359ce8)
This commit is contained in:
parent
99629af9b7
commit
459c5d3d9c
@ -308,6 +308,8 @@ CallPreamble(register struct rx_call *acall, int activecall,
|
|||||||
char hoststr[16], hoststr2[16];
|
char hoststr[16], hoststr2[16];
|
||||||
struct ubik_client *uclient;
|
struct ubik_client *uclient;
|
||||||
|
|
||||||
|
*ahostp = NULL;
|
||||||
|
|
||||||
if (!tconn) {
|
if (!tconn) {
|
||||||
ViceLog(0, ("CallPreamble: unexpected null tconn!\n"));
|
ViceLog(0, ("CallPreamble: unexpected null tconn!\n"));
|
||||||
return -1;
|
return -1;
|
||||||
@ -427,14 +429,19 @@ CallPostamble(register struct rx_connection *aconn, afs_int32 ret,
|
|||||||
held = h_Held_r(thost);
|
held = h_Held_r(thost);
|
||||||
if (held)
|
if (held)
|
||||||
h_Release_r(thost);
|
h_Release_r(thost);
|
||||||
if (ahost != thost) {
|
if (ahost && ahost != thost) {
|
||||||
char hoststr[16], hoststr2[16];
|
char hoststr[16], hoststr2[16];
|
||||||
ViceLog(0, ("CallPostamble: ahost %s:%d (%x) != thost %s:%d (%x)\n",
|
ViceLog(0, ("CallPostamble: ahost %s:%d (%x) != thost %s:%d (%x)\n",
|
||||||
afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port),
|
afs_inet_ntoa_r(ahost->host, hoststr), ntohs(ahost->port),
|
||||||
ahost,
|
ahost,
|
||||||
afs_inet_ntoa_r(thost->host, hoststr2), ntohs(thost->port),
|
afs_inet_ntoa_r(thost->host, hoststr2), ntohs(thost->port),
|
||||||
thost));
|
thost));
|
||||||
h_Release_r(ahost);
|
h_Release_r(ahost);
|
||||||
|
} else if (!ahost) {
|
||||||
|
char hoststr[16];
|
||||||
|
ViceLog(0, ("CallPostamble: null ahost for thost %s:%d (%x)\n",
|
||||||
|
afs_inet_ntoa_r(thost->host, hoststr), ntohs(thost->port),
|
||||||
|
thost));
|
||||||
}
|
}
|
||||||
H_UNLOCK;
|
H_UNLOCK;
|
||||||
return (translate ? sys_error_to_et(ret) : ret);
|
return (translate ? sys_error_to_et(ret) : ret);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user