View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005083 | unreal | ircd | public | 2018-03-27 03:47 | 2018-04-22 09:38 |
Reporter | Sky-Dancer | Assigned To | syzop | ||
Priority | none | Severity | tweak | Reproducibility | N/A |
Status | resolved | Resolution | fixed | ||
Fixed in Version | 4.0.18 | ||||
Summary | 0005083: ctx init on reload | ||||
Description | in ssl.c; 441 tmp = init_ctx(iConf.ssl_options, 1); ... 449 SSL_CTX_free(tmp); 450 SSL_CTX_free(ctx_server); 451 ctx_server = init_ctx(iConf.ssl_options, 1); AND 453 tmp = init_ctx(iConf.ssl_options, 0); ... 461 SSL_CTX_free(tmp); 462 SSL_CTX_free(ctx_client); 463 ctx_client = init_ctx(iConf.ssl_options, 0); you can simply equilaze tmp pointer to ctx_server and ctx_client i think. SSL_CTX_free(ctx_server); ctx_server = tmp; // simply use this tmp named pointer's address. AND SSL_CTX_free(ctx_client); ctx_client = tmp; why did you create/check ctx pointer twice? (because you already checked them in first init_ctx calls) did i miss something here :S ? | ||||
Tags | No tags attached. | ||||
3rd party modules | |||||
|
Yes, that's true and a good idea. Perhaps it was for historic reasons when init_ctx() had some global side-effects. I don't recall... Whatever the reason, good or bad, I ended up copying that for each case and it's not necessary. I'll see if I can change it to what you suggested at the various places. The code changed 1-2 days ago which is a good opportunity to simplify the code :) |
|
Fixed, thanks for the report. https://github.com/unrealircd/unrealircd/commit/a235b3563368065ea31c409bd69e3e166a04b80c commit a235b3563368065ea31c409bd69e3e166a04b80c Author: Bram Matthys <[email protected]> Date: Sun Apr 22 09:35:05 2018 +0200 This code can be a lot simpler, duh. Reported by Sky-Dancer (0005078). |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-03-27 03:47 | Sky-Dancer | New Issue | |
2018-03-27 08:10 | syzop | Note Added: 0020076 | |
2018-03-27 08:10 | syzop | Status | new => acknowledged |
2018-04-22 09:38 | syzop | Assigned To | => syzop |
2018-04-22 09:38 | syzop | Status | acknowledged => resolved |
2018-04-22 09:38 | syzop | Resolution | open => fixed |
2018-04-22 09:38 | syzop | Fixed in Version | => 4.0.18 |
2018-04-22 09:38 | syzop | Note Added: 0020102 |