From: Alan T. DeKok Date: Mon, 6 Feb 2012 09:53:52 +0000 (+0100) Subject: Allow data2vp_any() to be called with packet==NULL X-Git-Tag: release_3_0_0_beta0~338 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7793dc6dd1d60a9e05a390a2fb4a3f3530c0127;p=thirdparty%2Ffreeradius-server.git Allow data2vp_any() to be called with packet==NULL The packet is only used to decrypt certain attributes. If there is no need to decrypt those attributes, then the packet pointer isn't necessary. --- diff --git a/src/lib/radius.c b/src/lib/radius.c index 29890bd5023..8bcca4f3948 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -2919,7 +2919,7 @@ static ssize_t data2vp_any(const RADIUS_PACKET *packet, /* * Decrypt the attribute. */ - if (secret) switch (vp->flags.encrypt) { + if (secret && packet) switch (vp->flags.encrypt) { /* * User-Password */