Hardcoding argv[2] is wrong in presence of -v option. Code
immediately following did the correct argv[] indexing already.
Signed-off-by: Frank Ch. Eigler <fche@redhat.com>
+2020-03-24 Frank Ch. Eigler <fche@redhat.com>
+
+ * debuginfod-find.c (main): Correct /source full-pathness check for
+ "debuginfod-find -v source deadbeef /pathname" case.
+
2020-03-22 Frank Ch. Eigler <fche@redhat.com>
* debuginfod-client.c (struct debuginfod_client): Add url field.
/* Command-line frontend for retrieving ELF / DWARF / source files
from the debuginfod.
- Copyright (C) 2019 Red Hat, Inc.
+ Copyright (C) 2019-2020 Red Hat, Inc.
This file is part of elfutils.
This file is free software; you can redistribute it and/or modify
&cache_name);
else if (strcmp(argv[remaining], "source") == 0)
{
- if (remaining+2 == argc || argv[3][0] != '/')
+ if (remaining+2 == argc || argv[remaining+2][0] != '/')
{
fprintf(stderr, "If FILETYPE is \"source\" then absolute /FILENAME must be given\n");
return 1;