]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
vp_prints should check for NULL da
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 19 Feb 2013 15:28:49 +0000 (10:28 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 19 Feb 2013 18:18:20 +0000 (13:18 -0500)
src/lib/print.c

index c0774873aee66d464c8e99a819b21b20ddfbb724..64621c60422bdc4c7e3ffbaf026c75b7f88ffd43 100644 (file)
@@ -603,8 +603,8 @@ int vp_prints(char *out, size_t outlen, const VALUE_PAIR *vp)
        size_t          len;
        const char      *token = NULL;
 
-       out[0] = 0;
-       if (!vp) return 0;
+       out[0] = '\0';
+       if (!vp || !vp->da) return 0;
 
        if ((vp->op > T_OP_INVALID) &&
            (vp->op < T_TOKEN_LAST)) {