Changeset f61e7ac


Ignore:
Timestamp:
Feb 9, 2010, 9:49:54 PM (15 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10, release-1.6, release-1.7, release-1.8, release-1.9
Children:
8789410
Parents:
1f37eba
git-author:
Anders Kaseorg <andersk@mit.edu> (02/08/10 22:45:32)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/09/10 21:49:54)
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

    r1f37eba rf61e7ac  
    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.