diff options
author | Guy Harris <guy@alum.mit.edu> | 2012-04-28 02:25:15 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2012-04-28 02:25:15 +0000 |
commit | faa13e5072bfb826c9d0756e521e011ecfdc4524 (patch) | |
tree | e44d5845f74ee76c808dcba13358379926ae49be /epan/crypt | |
parent | d6e5b20bf2a9b2c17ad8254133bc669cade374f7 (diff) |
Neither C90 nor C99 explicitly guarantee that a memcpy() call with a
null source argument and a zero count will work; in practice, they
probably will (with a zero count, there's nothing to fetch from the
source), but the Clang static analyzer still warns about it.
svn path=/trunk/; revision=42305
Diffstat (limited to 'epan/crypt')
-rw-r--r-- | epan/crypt/eax.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/epan/crypt/eax.c b/epan/crypt/eax.c index ad879d2fa4..0ca97fefb8 100644 --- a/epan/crypt/eax.c +++ b/epan/crypt/eax.c @@ -160,7 +160,9 @@ static void dCMAC(guint8 *pK, guint8 *ws, const guint8 *pN, guint16 SizeN, const return; } memcpy(work, pN, SizeN); - memcpy(&work[SizeN], pC, SizeC); + if (pC != NULL) { + memcpy(&work[SizeN], pC, SizeC); + } /* * pad the data if necessary, and XOR Q or D, depending on * whether data was padded or not |