Skip to content

Commit f5d0433

Browse files
authored
Improve handling of null terminated ELF segment
1 parent 3aeb619 commit f5d0433

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/sass/elf.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -363,10 +363,7 @@ def interpreter
363363
return if phdr.nil?
364364

365365
@io.seek(phdr[:p_offset], IO::SEEK_SET)
366-
interpreter = @io.read(phdr[:p_filesz])
367-
raise EncodingError unless interpreter.end_with?("\0")
368-
369-
interpreter.chomp!("\0")
366+
@io.read(phdr[:p_filesz]).unpack1('Z*')
370367
end
371368

372369
INTERPRETER = begin

0 commit comments

Comments
 (0)