mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
fixed potential use after free in openpgpsdk
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8491 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
4b624a6091
commit
779ebbf925
@ -1116,11 +1116,15 @@ ops_boolean_t ops_sign_file_as_cleartext(const char* input_filename,
|
||||
&& ops_signature_hashed_subpackets_end(sig)
|
||||
&& ops_write_signature(sig, &skey->public_key, skey, cinfo);
|
||||
|
||||
ops_teardown_file_write(cinfo, fd_out);
|
||||
|
||||
if (!rtn)
|
||||
OPS_ERROR(&cinfo->errors, OPS_E_W, "Cannot sign file as cleartext");
|
||||
|
||||
// we can't get errors in cinfo->errors while closing
|
||||
// because ops_teardown_file_write frees everything
|
||||
// it seems that writer finalisers do not report errors anyway
|
||||
// and ops_teardown_file_write does not have an return value, so we could not bubble something up
|
||||
ops_teardown_file_write(cinfo, fd_out);
|
||||
|
||||
return rtn;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user