arlolra / ctypes-otr

js-ctypes wrapper for libotr
Mozilla Public License 2.0
29 stars 7 forks source link

[WIP] Remove associated OTR keys when account is removed #95

Open vqhuy opened 6 years ago

vqhuy commented 6 years ago

We need to use memcpy instead of assigning the pointer directly https://github.com/arlolra/ctypes-otr/pull/95/files#diff-0ae302860237c1727af8cba50ff6e1c6R272. Currently the app crashes because of "double free" (perhaps).

arlolra commented 6 years ago

Currently the app crashes because of "double free" (perhaps).

Yeah, the calls to otrl_privkey_read_FILEp and then otrl_privkey_generate_cancelled in otrl_privkey_generate_finish_FILEp look like a double free.

vqhuy commented 6 years ago

I think it works now. Tested with a Linux build applied https://github.com/TheTorProject/tor-messenger-build/pull/15. PTAL.