diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-02-09 10:47:15 +0100 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-02-14 19:43:16 +0000 |
commit | 3c22361370f618b2414ff47da2ff9f2d27adb5e1 (patch) | |
tree | 0785a2dd8d34a9f5cc06e10ba35d60ef467096d7 /gcc/rust/backend | |
parent | df00fb8f5b8f8b6e68b6376b31d04efe22fc3107 (diff) | |
download | gcc-3c22361370f618b2414ff47da2ff9f2d27adb5e1.zip gcc-3c22361370f618b2414ff47da2ff9f2d27adb5e1.tar.gz gcc-3c22361370f618b2414ff47da2ff9f2d27adb5e1.tar.bz2 |
lex: Prevent directories in RAIIFile
RAIIFile constructor was accepting directory filename. This lead to
unattended directory opening in some part of the code (load_file_bytes)
wich resulted in ice. Since RAIIFile are used for the lexer, removing
the ability to open directories with RAIIFile fixes those issues and
prevent future mistakes.
gcc/rust/ChangeLog:
* lex/rust-lex.h: Add file type check.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Diffstat (limited to 'gcc/rust/backend')
0 files changed, 0 insertions, 0 deletions