A segmentation fault was discovered in radare2 with adf command. In libr/core/cmd_anal.c, when command "adf" has no or wrong argument, anal_fcn_data (core, input + 1) --> RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, core->offset, -1); returns null pointer for fcn causing segmentation fault later in ensure_fcn_range (fcn).
cpe:2.3:a:radare:radare2:*:*:*:*:*:*:*:*
EEE8DA49-FB7A-4416-8942-56DD67E62CD9
4.4.0
OR
### Work environment

| Questions                                            | Answers
|------------------------------------------------------|--------------------
| OS/arch/bits (mandatory)                             | Ubuntu x86 64
| File format of the file you reverse (mandatory)      | ELF
| Architecture/bits of the file (mandatory)            | x86/64
| r2 -v full output, **not truncated** (mandatory)     | radare2 4.3.1 23928 @ linux-x86-64 git.4.3.1-10-g1271d65 commit: 1271d653c7691047284a1de99d209972e3cee6d9 build: 2020-03-11__10:01:54


### Expected behavior
Handle input error
### Actual behavior
Segmentation fault

### Steps to reproduce the behavior 
$ r2 -
[0x00000000]> adf
Segmentation fault (core dumped)

### Additional Logs, screenshots, source-code,  configuration dump, ...
![image](https://user-images.githubusercontent.com/20163299/76677632-888f7d80-660b-11ea-922b-2ac18657b465.png)

in `libr/core/anal.c`, when command "adf" has no or wrong argument,
`anal_fcn_data (core, input + 1)` --> `RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, core->offset, -1);` 
 returns null pointer for `fnc` cause segmentation fault later in `ensure_fcn_range (fcn);`
command "adf" Segmentation fault
This is a GitHub Issue
repo:radare2
owner:radareorg
Title : command "adf" Segmentation fault
Issue date:

--- start body ---
### Work environment

| Questions                                            | Answers
|------------------------------------------------------|--------------------
| OS/arch/bits (mandatory)                             | Ubuntu x86 64
| File format of the file you reverse (mandatory)      | ELF
| Architecture/bits of the file (mandatory)            | x86/64
| r2 -v full output, **not truncated** (mandatory)     | radare2 4.3.1 23928 @ linux-x86-64 git.4.3.1-10-g1271d65 commit: 1271d653c7691047284a1de99d209972e3cee6d9 build: 2020-03-11__10:01:54


### Expected behavior
Handle input error
### Actual behavior
Segmentation fault

### Steps to reproduce the behavior 
$ r2 -
[0x00000000]> adf
Segmentation fault (core dumped)

### Additional Logs, screenshots, source-code,  configuration dump, ...
![image](https://user-images.githubusercontent.com/20163299/76677632-888f7d80-660b-11ea-922b-2ac18657b465.png)

in `libr/core/anal.c`, when command "adf" has no or wrong argument,
`anal_fcn_data (core, input + 1)` --> `RAnalFunction *fcn = r_anal_get_fcn_in (core->anal, core->offset, -1);` 
 returns null pointer for `fnc` cause segmentation fault later in `ensure_fcn_range (fcn);`
--- end body ---

comments :
--- start comments ---

--- end comments ---