Fix #4663 - segfault in r2 -d

This commit is contained in:
pancake 2016-04-19 19:46:41 +02:00
parent 7c3c865ef8
commit a1eb92966e

View File

@ -444,6 +444,10 @@ int main(int argc, char **argv, char **envp) {
return main_help (help > 1? 2: 0);
}
if (debug == 1) {
if (optind >= argc) {
eprintf ("Missing argument for -d\n");
return 1;
}
char *uri = strdup (argv[optind]);
char *p = strstr (uri, "://");
if (p) {