Changeset 96582d5


Ignore:
Timestamp:
Jul 8, 2010, 7:33:52 PM (14 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
7bfc613
Parents:
c43c77b
Message:
Fix a crash on 'zcrypt -m'.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • functions.c

    rc43c77b r96582d5  
    383383  char *zcrypt;
    384384  int rv, status;
     385  char *old_msg;
    385386
    386387  /* create the zwrite and send the message */
     
    389390    owl_zwrite_set_message(z, msg);
    390391  }
    391 
     392  old_msg = owl_strdup(owl_zwrite_get_message(z));
    392393
    393394  zcrypt = owl_sprintf("%s/zcrypt", owl_get_bindir());
     
    404405  if (rv || status) {
    405406    if(cryptmsg) owl_free(cryptmsg);
     407    owl_free(old_msg);
    406408    owl_function_error("Error in zcrypt, possibly no key found.  Message not sent.");
    407409    owl_function_beep();
     
    418420  if (owl_zwrite_is_personal(z)) {
    419421    /* Create the outgoing message. Restore the un-crypted message for display. */
    420     owl_zwrite_set_message(z, msg);
     422    owl_zwrite_set_message(z, old_msg);
    421423    m=owl_function_make_outgoing_zephyr(z);
    422424    if (m) {
Note: See TracChangeset for help on using the changeset viewer.