Skip to content

Commit 368dc60

Browse files
committed
Merge pull request #326 from libtom/pr/ccm_process
fixes #323 ccm_process fails to process input buffer longer than 256 (cherry picked from commit 7c4c61d)
1 parent 153b897 commit 368dc60

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/encauth/ccm/ccm_process.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ int ccm_process(ccm_state *ccm,
2424
unsigned char *ct,
2525
int direction)
2626
{
27-
unsigned char y, z, b;
27+
unsigned char z, b;
28+
unsigned long y;
2829
int err;
2930

3031
LTC_ARGCHK(ccm != NULL);
@@ -44,9 +45,8 @@ int ccm_process(ccm_state *ccm,
4445
if (ptlen > 0) {
4546
LTC_ARGCHK(pt != NULL);
4647
LTC_ARGCHK(ct != NULL);
47-
y = 0;
4848

49-
for (; y < ptlen; y++) {
49+
for (y = 0; y < ptlen; y++) {
5050
/* increment the ctr? */
5151
if (ccm->CTRlen == 16) {
5252
for (z = 15; z > 15-ccm->L; z--) {

0 commit comments

Comments
 (0)