diff --git a/options.c b/options.c index 55aef66c9..74b39bf6a 100644 --- a/options.c +++ b/options.c @@ -1372,6 +1372,10 @@ int parse_arguments(int *argc_p, const char ***argv_p) /* TODO: Call poptReadDefaultConfig; handle errors. */ pc = poptGetContext(RSYNC_NAME, argc, argv, long_options, 0); + if (pc == NULL) { + strlcpy(err_buf, "poptGetContext returned NULL\n", sizeof err_buf); + return 0; + } if (!am_server) { poptReadDefaultConfig(pc, 0); popt_unalias(pc, "--daemon");