Skip to content

Commit ab5c99a

Browse files
committed
fixed a division by zero if the blocksize of the bigintger to byte array requests a length blocksize
1 parent c8845f6 commit ab5c99a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/main/java/de/rub/nds/modifiablevariable/util/ArrayConverter.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,7 @@ public static void makeArrayNonZero(final byte[] array) {
276276
* @return big integer represented in bytes, padded to a specific block size
277277
*/
278278
public static byte[] bigIntegerToByteArray(BigInteger value, int blockSize, boolean removeSignByte) {
279-
if(blockSize == 0)
280-
{
279+
if (blockSize == 0) {
281280
return new byte[0];
282281
}
283282
byte[] array = value.toByteArray();

0 commit comments

Comments
 (0)