/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

  • Committer: Teddy Hogeborn
  • Date: 2018-04-01 19:27:30 UTC
  • Revision ID: teddy@recompile.se-20180401192730-jwr4io5cb3x5u268
Don't print NULL string pointers in error message output

* plugins.d/mandos-client.c (pgp_packet_decrypt): If decryption fails,
  don't print unsupported_algorithm if it is NULL.

Show diffs side-by-side

added added

removed removed

Lines of Context:
420
420
      if(result == NULL){
421
421
        fprintf_plus(stderr, "gpgme_op_decrypt_result failed\n");
422
422
      } else {
423
 
        fprintf_plus(stderr, "Unsupported algorithm: %s\n",
424
 
                     result->unsupported_algorithm);
 
423
        if(result->unsupported_algorithm != NULL) {
 
424
          fprintf_plus(stderr, "Unsupported algorithm: %s\n",
 
425
                       result->unsupported_algorithm);
 
426
        }
425
427
        fprintf_plus(stderr, "Wrong key usage: %u\n",
426
428
                     result->wrong_key_usage);
427
429
        if(result->file_name != NULL){