Index: Source/modules/crypto/NormalizeAlgorithm.cpp |
diff --git a/Source/modules/crypto/NormalizeAlgorithm.cpp b/Source/modules/crypto/NormalizeAlgorithm.cpp |
index 53c8c555bcf44e1180b8de4666248a2dadfab821..758bde0df354cc7c89b831b8bbd33b0363908d5c 100644 |
--- a/Source/modules/crypto/NormalizeAlgorithm.cpp |
+++ b/Source/modules/crypto/NormalizeAlgorithm.cpp |
@@ -317,14 +317,10 @@ bool getBigInteger(const Dictionary& raw, const char* propertyName, RefPtr<Uint8 |
return false; |
if (!array->byteLength()) { |
- setSyntaxError(context.toString(propertyName, "BigInteger should not be empty"), error); |
- return false; |
+ // Empty BigIntegers represent 0 according to the spec |
+ array = Uint8Array::create(1); |
} |
- if (!DictionaryHelper::get(raw, propertyName, array) || !array) { |
- setSyntaxError(context.toString(propertyName, "Missing or not a Uint8Array"), error); |
- return false; |
- } |
return true; |
} |