Check pubkeyBuf before pubkeyBuf.length

This commit is contained in:
Braydon Fuller 2015-07-06 10:26:18 -04:00
parent e5e783fbf9
commit febbcc6a6e

View File

@ -255,6 +255,7 @@ Script.prototype.isPublicKeyHashIn = function(inaccurate) {
if (signatureBuf &&
signatureBuf.length &&
signatureBuf[0] === 0x30 &&
pubkeyBuf &&
pubkeyBuf.length
) {
var version = pubkeyBuf[0];