Re: [PATCH 8/8] [CRYPTO] aead: Add support for multiple template parameters

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 27, 2007 at 05:25:45PM -0500, Joy Latten wrote:
>
> Shouldn't p be incremented after this check? Otherwise, it will 
> still be pointing to ')' after breaking from this for-loop and we will
> end up copying "hmac(sha1" instead of "hmac(sha1)", right?
> Also, I think we will prematurely break from top for-loop 
> because of check, "if (*p == ')') break;" which is done further down...

Good catch, I've checked in the following patch.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
diff --git a/crypto/cryptomgr.c b/crypto/cryptomgr.c
index c83884f..e5e3cf8 100644
--- a/crypto/cryptomgr.c
+++ b/crypto/cryptomgr.c
@@ -129,6 +129,7 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
 			}
 
 			notnum = 1;
+			p++;
 		}
 
 		len = p - name;
@@ -151,7 +152,7 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
 		param->tb[i + 1] = &param->attrs[i].attr;
 		i++;
 
-		if (WARN_ON(i >= CRYPTO_MAX_ATTRS))
+		if (i >= CRYPTO_MAX_ATTRS)
 			goto err_free_param;
 
 		if (*p == ')')
-
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux