A modern, delicious implementation of the Nix package manager, focused on correctness, usability, and growth — and committed to doing right by its community
Find a file
Tuomas Tynkkynen a0e38c16bc libexpr: Recognize newline in more places in lexer
Flex's regexes have an annoying feature: the dot matches everything
except a newline. This causes problems for expressions like:

"${0}\
"

where the backslash-newline combination matches this rule instead of the
intended one mentioned in the comment:

    <STRING>\$|\\|\$\\ {
                    /* This can only occur when we reach EOF, otherwise the above
                    (...|\$[^\{\"\\]|\\.|\$\\.)+ would have triggered.
                    This is technically invalid, but we leave the problem to the
                    parser who fails with exact location. */
                    return STR;
                }
However, the parser actually accepts the resulting token sequence
('"' DOLLAR_CURLY 0 '}' STR '"'), which is a problem because the lexer
rule didn't assign anything to yylval. Ultimately this leads to a crash
when dereferencing a NULL pointer in ExprConcatStrings::bindVars().

The fix does change the syntax of the language in some corner cases
but I think it's only turning previously invalid (or crashing) syntax
to valid syntax. E.g.

"a\
b"

and

''a''\
b''

were previously syntax errors but now both result in "a\nb".

Found by afl-fuzz.
2018-03-02 17:30:48 +02:00
.github Rename 1.12 -> 2.0 2018-01-31 18:58:45 +01:00
config Add config.guess, config.sub and install-sh 2013-11-25 11:26:02 +00:00
corepkgs <nix/fetchurl.nix>: Don't access builtins.currentSystem 2018-01-16 19:24:23 +01:00
doc/manual Merge pull request #1901 from veprbl/patch-5 2018-02-24 10:26:14 -05:00
maintainers Release script tweaks 2018-02-22 17:11:17 +01:00
misc launchd: enable keepalive for the nix-daemon service 2018-02-28 19:58:48 +01:00
mk Add plugins to make Nix more extensible. 2018-02-08 12:44:37 -05:00
perl Replace Unicode quotes in user-facing strings by ASCII 2017-07-30 12:32:45 +01:00
scripts Merge pull request #1775 from LnL7/darwin-build-users 2018-02-13 12:31:53 +01:00
src libexpr: Recognize newline in more places in lexer 2018-03-02 17:30:48 +02:00
tests libexpr: Recognize newline in more places in lexer 2018-03-02 17:30:48 +02:00
.dir-locals.el Add .dir-locals.el for Emacs 2016-01-28 11:12:04 +01:00
.editorconfig Add .editorconfig 2017-06-05 22:57:28 +01:00
.gitignore Add plugins to make Nix more extensible. 2018-02-08 12:44:37 -05:00
.travis.yml Test the installer 2017-07-14 12:11:04 -04:00
bootstrap.sh bootstrap: Simplify & make more robust. 2011-09-06 12:11:05 +00:00
configure.ac configure.ac: define HAVE_SECCOMP macro when using seccomp, fix build/tests 2018-02-19 12:13:51 -06:00
COPYING * Change this to LGPL to keep the government happy. 2006-04-25 16:41:06 +00:00
local.mk release.nix: Use fetchTarball and fetchGit 2017-12-22 11:35:32 +01:00
Makefile Add plugins to make Nix more extensible. 2018-02-08 12:44:37 -05:00
Makefile.config.in configure: Add a flag to disable seccomp. 2018-02-18 02:35:01 -05:00
nix.spec.in Fix RPM build 2017-10-24 15:44:29 +02:00
README.md Fix minor grammatical nitpick ("it's" vs. "its") in README.md. 2017-03-22 10:11:23 -04:00
release-common.nix Merge branch 'fix/sandbox-shell-features' of https://github.com/dtzWill/nix 2018-02-22 12:20:13 +01:00
release.nix Fix evaluation of binaryTarball.aarch64-linux 2018-02-20 12:33:32 +01:00
shell.nix Simplify build by including nlohmann/json.hpp 2017-12-04 17:11:36 +01:00
version Rename 1.12 -> 2.0 2018-01-31 18:58:45 +01:00

Nix, the purely functional package manager

Nix is a new take on package management that is fairly unique. Because of its purity aspects, a lot of issues found in traditional package managers don't appear with Nix.

To find out more about the tool, usage and installation instructions, please read the manual, which is available on the Nix website at http://nixos.org/nix/manual.

Contributing

Take a look at the Hacking Section of the manual. It helps you to get started with building Nix from source.

License

Nix is released under the LGPL v2.1

This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit.