Re: linux-next/drivers/crypto/atmel-aes.c:282: possible missing break ?

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

 



On Mon, Jan 18, 2016 at 03:41:46PM +0000, David Binderman wrote:
> Hello there,
> 
> [linux-next/drivers/crypto/atmel-aes.c:285]: (warning) Buffer 'tmp' is being written before its old content has been used. 'break;' missing?
> 
>     case AES_GCMHR(3):
>         snprintf(tmp, sz, "GCMHR[%u]", (offset - AES_GCMHR(0))>> 2);
> 
>     default:
>         snprintf(tmp, sz, "0x%02x", offset);
>         break;

Indeed.  Thanks!

---8<---
Subject: crypto: atmel-aes - Add missing break to atmel_aes_reg_name

The debug function atmel_aes_reg_name was missing a break for
AES_GCMHR.

Reported-by: David Binderman <dcb314@xxxxxxxxxxx>
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>

diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 5621612..6dd3317 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -280,6 +280,7 @@ static const char *atmel_aes_reg_name(u32 offset, char *tmp, size_t sz)
 	case AES_GCMHR(2):
 	case AES_GCMHR(3):
 		snprintf(tmp, sz, "GCMHR[%u]", (offset - AES_GCMHR(0)) >> 2);
+		break;
 
 	default:
 		snprintf(tmp, sz, "0x%02x", offset);
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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