-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/I+zQACgkQrlYvE4MpobPSOACfZkEz4xM4K7E5r9r0NdVZkVrl h20An3CQKqJe3EGHw/IjWRiCiKzTzis4 =m7em -----END PGP SIGNATURE-----
>From bf4192f5e045de52f861045348682b511283c831 Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Fri, 25 May 2012 07:11:21 -0400 Subject: [PATCH 71/90] asprintf return code must be checked --- libselinux/src/label.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libselinux/src/label.c b/libselinux/src/label.c index a9e0853..89e28f1 100644 --- a/libselinux/src/label.c +++ b/libselinux/src/label.c @@ -47,7 +47,8 @@ static char *selabel_sub(struct selabel_sub *ptr, const char *src) if (strncmp(src, ptr->src, ptr->slen) == 0 ) { if (src[ptr->slen] == '/' || src[ptr->slen] == 0) { - asprintf(&dst, "%s%s", ptr->dst, &src[ptr->slen]); + if (asprintf(&dst, "%s%s", ptr->dst, &src[ptr->slen]) < 0) + return NULL; return dst; } } -- 1.7.10.2