argv buffer overflow? #206
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
Hi,
in cli/main.c:
const char *package = argv[pkg_optind];
pkg_optind is initialized to 1 (in getopt_long.c).
What if argc is 1 (i.e. no params were passed, just the executable path)?
This may cause buffer overflow?
Should this be:
const char *package = (argc == 1) ? NULL : argv[pkg_optind];