comparison libtomcrypt/src/mac/xcbc/xcbc_done.c @ 1478:3a933956437e coverity

update coverity
author Matt Johnston <matt@ucc.asn.au>
date Fri, 09 Feb 2018 23:49:22 +0800
parents 6dba84798cd5
children
comparison
equal deleted inserted replaced
1439:8d24733026c5 1478:3a933956437e
3 * LibTomCrypt is a library that provides various cryptographic 3 * LibTomCrypt is a library that provides various cryptographic
4 * algorithms in a highly modular and flexible manner. 4 * algorithms in a highly modular and flexible manner.
5 * 5 *
6 * The library is free for all purposes without any express 6 * The library is free for all purposes without any express
7 * guarantee it works. 7 * guarantee it works.
8 *
9 * Tom St Denis, [email protected], http://libtom.org
10 */ 8 */
11 #include "tomcrypt.h" 9 #include "tomcrypt.h"
12 10
13 /** 11 /**
14 @file xcbc_done.c 12 @file xcbc_done.c
60 /* extract tag */ 58 /* extract tag */
61 for (x = 0; x < xcbc->blocksize && (unsigned long)x < *outlen; x++) { 59 for (x = 0; x < xcbc->blocksize && (unsigned long)x < *outlen; x++) {
62 out[x] = xcbc->IV[x]; 60 out[x] = xcbc->IV[x];
63 } 61 }
64 *outlen = x; 62 *outlen = x;
65 63
66 #ifdef LTC_CLEAN_STACK 64 #ifdef LTC_CLEAN_STACK
67 zeromem(xcbc, sizeof(*xcbc)); 65 zeromem(xcbc, sizeof(*xcbc));
68 #endif 66 #endif
69 return CRYPT_OK; 67 return CRYPT_OK;
70 } 68 }
71 69
72 #endif 70 #endif
73 71
74 /* $Source$ */ 72 /* ref: $Format:%D$ */
75 /* $Revision$ */ 73 /* git commit: $Format:%H$ */
76 /* $Date$ */ 74 /* commit time: $Format:%ai$ */
77 75