Herbert Xu 9b2f4cb65f crypto: authenc - Fix crash with zero-length assoc data
The authenc code doesn't deal with zero-length associated data
correctly and ends up constructing a zero-length sg entry which
causes a crash when it's fed into the crypto system.

This patch fixes this by avoiding the code-path that triggers
the SG construction if we have no associated data.

This isn't the most optimal fix as it means that we'll end up
using the fallback code-path even when we could still execute
the digest function.  However, this isn't a big deal as nobody
but the test path would supply zero-length associated data.

Reported-by: Romain Francoise <romain@orebokech.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Romain Francoise <romain@orebokech.com>
2012-09-11 12:05:45 +08:00
..
2011-07-26 16:49:47 -07:00
2012-04-02 04:33:42 -04:00
2010-02-16 20:26:46 +08:00
2012-04-02 04:33:42 -04:00
2010-11-13 21:47:55 +09:00
2010-02-16 20:29:45 +08:00
2010-05-26 10:36:51 +10:00
2008-06-02 15:46:51 +10:00
2010-02-16 20:33:49 +08:00
2010-12-02 14:47:16 +08:00
2008-08-29 15:50:02 +10:00
2010-12-02 14:47:16 +08:00
2008-04-21 10:19:34 +08:00
2008-04-21 10:19:34 +08:00
2011-08-06 18:32:45 -07:00
2012-04-02 04:33:42 -04:00
2012-04-02 04:33:42 -04:00
2007-10-10 16:55:38 -07:00
2012-04-02 04:33:42 -04:00
2008-04-21 10:19:34 +08:00
2008-12-25 11:02:21 +11:00
2012-05-23 17:08:40 -07:00