Commit 263f2bd
authored
Test shared_ptr before accessing members (etr#239)
* Add check for empty shared_ptr<http_response>
Users can register arbitrary resources and could technically return
empty shared_ptr without managed http_response object. This case should
not crash the library.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
References: etr#238
* Test shared_ptr before accessing members
Avoid possible segfault if someone returns an empty
shared_ptr<http_response> in her render method.
Signed-off-by: Alexander Dahl <ada@thorsis.com>
Fixes: etr#2381 parent c5cf5ea commit 263f2bd
2 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
596 | 596 | | |
597 | 597 | | |
598 | 598 | | |
599 | | - | |
| 599 | + | |
600 | 600 | | |
601 | 601 | | |
602 | 602 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
196 | 203 | | |
197 | 204 | | |
198 | 205 | | |
| |||
629 | 636 | | |
630 | 637 | | |
631 | 638 | | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
632 | 655 | | |
633 | 656 | | |
634 | 657 | | |
| |||
0 commit comments