From af86132e1afa65b4b466af3ea9c7084836c91ee0 Mon Sep 17 00:00:00 2001 From: Tuomas Tynkkynen Date: Tue, 3 Apr 2018 15:27:17 +0300 Subject: 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. --- tests/lang/eval-okay-getattrpos-undefined.nix | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/lang/eval-okay-getattrpos-undefined.nix (limited to 'tests/lang/eval-okay-getattrpos-undefined.nix') diff --git a/tests/lang/eval-okay-getattrpos-undefined.nix b/tests/lang/eval-okay-getattrpos-undefined.nix new file mode 100644 index 000000000000..14dd38f7734c --- /dev/null +++ b/tests/lang/eval-okay-getattrpos-undefined.nix @@ -0,0 +1 @@ +builtins.unsafeGetAttrPos "abort" builtins -- cgit 1.4.1