mirror of
https://github.com/urbit/shrub.git
synced 2024-11-28 05:22:27 +03:00
fixed jet discrepancy
This commit is contained in:
parent
0385e3a701
commit
97d679ee69
2
Makefile
2
Makefile
@ -39,7 +39,7 @@ RM=rm -f
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
CXXFLAGS=$(CFLAGS)
|
||||
CLD=g++ -L/usr/local/lib -L/opt/local/lib
|
||||
CLD=g++ -g -L/usr/local/lib -L/opt/local/lib
|
||||
|
||||
ifeq ($(OS),osx)
|
||||
COSFLAGS=-fno-diagnostics-fixit-info
|
||||
|
@ -28,7 +28,8 @@ int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t,
|
||||
b_p[pl] = 0; b_s[sl]=0;
|
||||
c3_y* buf = u3a_malloc(d);
|
||||
|
||||
_crypto_scrypt(b_p, pl, b_s, sl, n, r, z, buf, d);
|
||||
if (_crypto_scrypt(b_p, pl, b_s, sl, n, r, z, buf, d) != 0)
|
||||
return u3m_bail(c3__exit);
|
||||
|
||||
u3_noun res = u3i_bytes(d, buf);
|
||||
u3a_free(b_p); u3a_free(b_s); u3a_free(buf);
|
||||
@ -62,7 +63,8 @@ int _crypto_scrypt(const uint8_t *, size_t, const uint8_t *, size_t,
|
||||
b_p[pl] = 0; b_s[sl]=0;
|
||||
c3_y* buf = u3a_malloc(d);
|
||||
|
||||
_crypto_scrypt(b_p, pl, b_s, sl, n, r, z, buf, d);
|
||||
if (_crypto_scrypt(b_p, pl, b_s, sl, n, r, z, buf, d) != 0)
|
||||
return u3m_bail(c3__exit);
|
||||
|
||||
u3_noun res = u3i_bytes(d, buf);
|
||||
u3a_free(b_p); u3a_free(b_s); u3a_free(buf);
|
||||
@ -166,6 +168,9 @@ _crypto_scrypt(const uint8_t * passwd, size_t passwdlen,
|
||||
uint32_t * XY;
|
||||
uint32_t i;
|
||||
|
||||
if (((N & (N-1)) != 0) || N == 0)
|
||||
goto err0;
|
||||
|
||||
/* Sanity-check parameters. */
|
||||
#if SIZE_MAX > UINT32_MAX
|
||||
if (buflen > (((uint64_t)(1) << 32) - 1) * 32) {
|
||||
|
Loading…
Reference in New Issue
Block a user