Changeset 212d8b7


Ignore:
Timestamp:
Mar 1, 2010, 8:33:48 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
release-1.5
Children:
67e5f4c9
Parents:
ccfa7d1
git-author:
Anders Kaseorg <andersk@mit.edu> (02/08/10 22:45:32)
git-committer:
Nelson Elhage <nelhage@mit.edu> (03/01/10 20:33:48)
Message:
zcrypt: Don’t allocate 32 times as much memory as we need for decrypting.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Nelson Elhage <nelhage@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zcrypt.c

    rccfa7d1 r212d8b7  
    104104  int i, c1, c2;
    105105
    106   out = owl_malloc(strlen(in) * 16 + 20);
     106  /* We read in some number of full 16-byte blocks and write out the
     107   * same number of 8-byte blocks, plus a null terminator.
     108   */
     109  out = owl_malloc((strlen(in) / 16) * 8 + 1);
    107110
    108111  strcpy(out, "");
Note: See TracChangeset for help on using the changeset viewer.