[Bug debuginfod/25728] Starting debubinfod with --port=0 is not documented
mark at klomp dot org
sourceware-bugzilla@sourceware.org
Thu Mar 26 11:57:31 GMT 2020
https://sourceware.org/bugzilla/show_bug.cgi?id=25728
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #1 from Mark Wielaard <mark at klomp dot org> ---
Is this behavior actually useful or does --port=0 work by accident?
I don't see this (http_port == 0) documented for MHD_start_daemon.
So I would actually just reject it:
diff --git a/debuginfod/debuginfod.cxx b/debuginfod/debuginfod.cxx
index 7c7e85eb..39736351 100644
--- a/debuginfod/debuginfod.cxx
+++ b/debuginfod/debuginfod.cxx
@@ -422,7 +422,8 @@ parse_opt (int key, char *arg,
case 'v': verbose ++; break;
case 'd': db_path = string(arg); break;
case 'p': http_port = (unsigned) atoi(arg);
- if (http_port > 65535) argp_failure(state, 1, EINVAL, "port number");
+ if (http_port == 0 || http_port > 65535)
+ argp_failure(state, 1, EINVAL, "port number");
break;
case 'F': scan_files = true; break;
case 'R':
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Elfutils-devel
mailing list