public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
* [Bug debuginfod/31637] New: segmentation fault when calling 'debuginfod-find -v'
@ 2024-04-12 20:19 nolange79 at gmail dot com
  2024-04-12 21:41 ` [Bug debuginfod/31637] " fche at redhat dot com
  0 siblings, 1 reply; 2+ messages in thread
From: nolange79 at gmail dot com @ 2024-04-12 20:19 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=31637

            Bug ID: 31637
           Summary: segmentation fault when calling 'debuginfod-find -v'
           Product: elfutils
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: debuginfod
          Assignee: unassigned at sourceware dot org
          Reporter: nolange79 at gmail dot com
                CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

Little to add, bug is reproducible in 188 and 191.


#0  __strcmp_avx2 () at ../sysdeps/x86_64/multiarch/strcmp-avx2.S:283
#1  0x000055555555630c in main (argc=2, argv=0x7fffffffe178) at
/tmp/elfutils-latest/elfutils-0.191/debuginfod/debuginfod-find.c:194

Bug is this line:

if (strcmp(argv[remaining], "debuginfo") == 0)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug debuginfod/31637] segmentation fault when calling 'debuginfod-find -v'
  2024-04-12 20:19 [Bug debuginfod/31637] New: segmentation fault when calling 'debuginfod-find -v' nolange79 at gmail dot com
@ 2024-04-12 21:41 ` fche at redhat dot com
  0 siblings, 0 replies; 2+ messages in thread
From: fche at redhat dot com @ 2024-04-12 21:41 UTC (permalink / raw)
  To: elfutils-devel

https://sourceware.org/bugzilla/show_bug.cgi?id=31637

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
Fixed with commit d9f38a7052c22c7762aa5b98b401e8a324336bce, committed as
obvious.

diff --git a/debuginfod/debuginfod-find.c b/debuginfod/debuginfod-find.c
index 307310988c4c..080dd8f2c6a3 100644
--- a/debuginfod/debuginfod-find.c
+++ b/debuginfod/debuginfod-find.c
@@ -136,7 +136,7 @@ main(int argc, char** argv)
   int remaining;
   (void) argp_parse (&argp, argc, argv, ARGP_IN_ORDER|ARGP_NO_ARGS,
&remaining, NULL);

-  if (argc < 2 || remaining+1 == argc) /* no arguments or at least two
non-option words */
+  if (argc < 2 || remaining+1 >= argc) /* no arguments or at least two
non-option words */


and a little test.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-12 21:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 20:19 [Bug debuginfod/31637] New: segmentation fault when calling 'debuginfod-find -v' nolange79 at gmail dot com
2024-04-12 21:41 ` [Bug debuginfod/31637] " fche at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).