mirror of
https://github.com/NixOS/nix
synced 2025-07-08 02:43:54 +02:00
libexpr: Make unsafeGetAttrPos not crash on noPos
Currently e.g. `builtins.unsafeGetAttrPos "abort" builtins` will eventually segfault because pos->file is an unset Symbol. Found by afl-fuzz.
This commit is contained in:
parent
3fbaa230a2
commit
af86132e1a
3 changed files with 3 additions and 1 deletions
1
tests/lang/eval-okay-getattrpos-undefined.exp
Normal file
1
tests/lang/eval-okay-getattrpos-undefined.exp
Normal file
|
@ -0,0 +1 @@
|
|||
null
|
1
tests/lang/eval-okay-getattrpos-undefined.nix
Normal file
1
tests/lang/eval-okay-getattrpos-undefined.nix
Normal file
|
@ -0,0 +1 @@
|
|||
builtins.unsafeGetAttrPos "abort" builtins
|
Loading…
Add table
Add a link
Reference in a new issue