about summary refs log tree commit diff
path: root/doc
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-02-19T16·44+0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-02-19T21·20+0200
commit546f98dace5c3569211caf392c9dde06a20aa7b0 (patch)
tree39b13a7081d782b0ca5679929ba601d6c1a868ec /doc
parent4ea9707591beceacf9988b3c185faf50da238403 (diff)
libutil: Fix invalid assert on decoding base64 hashes
The assertion is broken because there is no one-to-one mapping from
length of a base64 string to the length of the output.

E.g.

"1q69lz7Empb06nzfkj651413n9icx0njmyr3xzq1j9q=" results in a 32-byte output.
"1q69lz7Empb06nzfkj651413n9icx0njmyr3xzq1j9qy" results in a 33-byte output.

To reproduce, evaluate:

builtins.derivationStrict {
    name = "0";
    builder = "0";
    system = "0";
    outputHashAlgo = "sha256";
    outputHash = "1q69lz7Empb06nzfkj651413n9icx0njmyr3xzq1j9qy";
}

Found by afl-fuzz.
Diffstat (limited to 'doc')
0 files changed, 0 insertions, 0 deletions