mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'public/bug11275_024'
This commit is contained in:
commit
3ddbf2880f
3
changes/bug11275
Normal file
3
changes/bug11275
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor bugfixes:
|
||||
- Fix a minor memory leak that occurred when signing a directory
|
||||
object. Fixes bug 11275; bugfix on 0.2.4.13-alpha.
|
@ -680,7 +680,7 @@ router_get_dirobj_signature(const char *digest,
|
||||
|
||||
/** Helper: used to generate signatures for routers, directories and
|
||||
* network-status objects. Given a digest in <b>digest</b> and a secret
|
||||
* <b>private_key</b>, generate an PKCS1-padded signature, BASE64-encode it,
|
||||
* <b>private_key</b>, generate a PKCS1-padded signature, BASE64-encode it,
|
||||
* surround it with -----BEGIN/END----- pairs, and write it to the
|
||||
* <b>buf_len</b>-byte buffer at <b>buf</b>. Return 0 on success, -1 on
|
||||
* failure.
|
||||
@ -703,6 +703,7 @@ router_append_dirobj_signature(char *buf, size_t buf_len, const char *digest,
|
||||
return -1;
|
||||
}
|
||||
memcpy(buf+s_len, sig, sig_len+1);
|
||||
tor_free(sig);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user