diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-01-15 06:18:30 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-01-15 06:18:30 +0000 |
commit | 351bd62f71d4ca5138e3d4a33c94852f307cf03c (patch) | |
tree | 1e09624a857253974e99be44d10490f84f798295 | |
parent | faf85ab25e44464b8c4c71e0966e70a25ac49e62 (diff) | |
download | aports-351bd62f71d4ca5138e3d4a33c94852f307cf03c.tar.bz2 aports-351bd62f71d4ca5138e3d4a33c94852f307cf03c.tar.xz |
main/nodejs: fix crypto hash error handling
fixes #4999
Upstream regression. Cherry-pick fix from
https://github.com/nodejs/node/issues/4221
-rw-r--r-- | main/nodejs/APKBUILD | 14 | ||||
-rw-r--r-- | main/nodejs/issue-4221.patch | 14 |
2 files changed, 23 insertions, 5 deletions
diff --git a/main/nodejs/APKBUILD b/main/nodejs/APKBUILD index a461b60ad2..1ba31a77e4 100644 --- a/main/nodejs/APKBUILD +++ b/main/nodejs/APKBUILD @@ -2,7 +2,7 @@ # Maintainer: Eivind Uggedal <eivind@uggedal.com> pkgname=nodejs pkgver=4.2.4 -pkgrel=0 +pkgrel=1 pkgdesc='Evented I/O for V8 javascript' url='http://nodejs.org/' arch='all' @@ -10,7 +10,8 @@ license='MIT' makedepends="$depends_dev python openssl-dev zlib-dev libuv-dev linux-headers paxmark" subpackages="$pkgname-dev $pkgname-doc" -source="http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz" +source="http://nodejs.org/dist/v$pkgver/node-v$pkgver.tar.gz + issue-4221.patch" _builddir="$srcdir"/node-v$pkgver prepare() { @@ -48,6 +49,9 @@ package() { done } -md5sums="86e4d0d8b626f6e60ca7bef02f2543d2 node-v4.2.4.tar.gz" -sha256sums="4ee244ffede7328d9fa24c3024787e71225b7abaac49fe2b30e68b27460c10ec node-v4.2.4.tar.gz" -sha512sums="78f216e8d8a3d7af4b75e091a6c1426073e1d089a67a19bbc71a4494f5a2f22275dfc68fd7341c3d60971c37098f3455e243486289c15b69b8e74537c7da1fa0 node-v4.2.4.tar.gz" +md5sums="86e4d0d8b626f6e60ca7bef02f2543d2 node-v4.2.4.tar.gz +d5e343fc9d1da1718ec15280b290b4a1 issue-4221.patch" +sha256sums="4ee244ffede7328d9fa24c3024787e71225b7abaac49fe2b30e68b27460c10ec node-v4.2.4.tar.gz +4e241e38c96629a4d96b19c99bd9c82da86a766aa53a08f4b1bb3d90a7ec7eee issue-4221.patch" +sha512sums="78f216e8d8a3d7af4b75e091a6c1426073e1d089a67a19bbc71a4494f5a2f22275dfc68fd7341c3d60971c37098f3455e243486289c15b69b8e74537c7da1fa0 node-v4.2.4.tar.gz +36f91895bb339e0e386b4c2da9bca7eb5051083761ff66a61483fcc76b75e76b5e1a405e56ab4b39e53e3ee47d9cac5b7d949c42c1e7d919ee279fe8505dc58e issue-4221.patch" diff --git a/main/nodejs/issue-4221.patch b/main/nodejs/issue-4221.patch new file mode 100644 index 0000000000..1e592e2337 --- /dev/null +++ b/main/nodejs/issue-4221.patch @@ -0,0 +1,14 @@ +diff --git a/src/node_crypto.cc b/src/node_crypto.cc +index 63d767a..1b4cc1a 100644 +--- a/src/node_crypto.cc ++++ b/src/node_crypto.cc +@@ -3556,8 +3556,7 @@ bool Hash::HashInit(const char* hash_type) { + if (md_ == nullptr) + return false; + EVP_MD_CTX_init(&mdctx_); +- EVP_DigestInit_ex(&mdctx_, md_, nullptr); +- if (0 != ERR_peek_error()) { ++ if (EVP_DigestInit_ex(&mdctx_, md_, nullptr) <= 0) { + return false; + } + initialised_ = true; |