mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
linker: Don't rely on out-of-range bv-ref exceptions.
* module/system/vm/linker.scm (find-shstrndx): Check whether NAME is lower than the length of BV; remove 'false-if-exception' around 'string-table-ref' call.
This commit is contained in:
parent
8209f0f5c0
commit
b87068eee7
1 changed files with 3 additions and 3 deletions
|
@ -1,6 +1,6 @@
|
||||||
;;; Guile ELF linker
|
;;; Guile ELF linker
|
||||||
|
|
||||||
;; Copyright (C) 2011, 2012, 2013, 2014 Free Software Foundation, Inc.
|
;; Copyright (C) 2011, 2012, 2013, 2014, 2018 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;;;; This library is free software; you can redistribute it and/or
|
;;;; This library is free software; you can redistribute it and/or
|
||||||
;;;; modify it under the terms of the GNU Lesser General Public
|
;;;; modify it under the terms of the GNU Lesser General Public
|
||||||
|
@ -478,8 +478,8 @@ section index."
|
||||||
(bv (linker-object-bv object))
|
(bv (linker-object-bv object))
|
||||||
(name (elf-section-name section)))
|
(name (elf-section-name section)))
|
||||||
(and (= (elf-section-type section) SHT_STRTAB)
|
(and (= (elf-section-type section) SHT_STRTAB)
|
||||||
(equal? (false-if-exception (string-table-ref bv name))
|
(< name (bytevector-length bv))
|
||||||
".shstrtab")
|
(string=? (string-table-ref bv name) ".shstrtab")
|
||||||
(elf-section-index section))))
|
(elf-section-index section))))
|
||||||
objects))
|
objects))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue