]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
gdb/debuginfod: Prevent out_of_range exception
authorAaron Merey <amerey@redhat.com>
Fri, 8 Apr 2022 22:50:56 +0000 (18:50 -0400)
committerAaron Merey <amerey@redhat.com>
Wed, 20 Apr 2022 21:40:05 +0000 (17:40 -0400)
commit52449404c4e38000351e8f2c7b768f12fd808eda
treed26145c93b7c7c15fe93fbc394ccfbc11cec5897
parentb750766ac9652def5307925b8fc5c215fbcef8df
gdb/debuginfod: Prevent out_of_range exception

Trailing whitespace in the string of debuginfod URLs causes an
out_of_range exception during the printing of URLs for the first
use notice.

To fix this, stop printing URLs when the substring to be printed
consists only of whitespace.

Also add first use notice testcases.

Co-Authored-By: Pedro Alves <pedro@palves.net>
gdb/debuginfod-support.c
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp