Skip to content

Commit a15ca46

Browse files
committed
prevented zero length modifications
1 parent d6fcfe1 commit a15ca46

File tree

1 file changed

+16
-11
lines changed

1 file changed

+16
-11
lines changed

src/main/java/de/rub/nds/modifiablevariable/bytearray/ByteArrayModificationFactory.java

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,10 @@ public class ByteArrayModificationFactory {
5050

5151
/**
5252
*
53-
* @param xor bytes to xor
54-
* @param startPosition negative numbers mean that the position is taken
55-
* from the end
53+
* @param xor
54+
* bytes to xor
55+
* @param startPosition
56+
* negative numbers mean that the position is taken from the end
5657
* @return variable modification
5758
*/
5859
public static VariableModification<byte[]> xor(final byte[] xor, final int startPosition) {
@@ -61,7 +62,8 @@ public static VariableModification<byte[]> xor(final byte[] xor, final int start
6162

6263
/**
6364
*
64-
* @param payload bytes are set as value
65+
* @param payload
66+
* bytes are set as value
6567
* @return variable modification
6668
*/
6769
public static VariableModification<byte[]> payload(final byte[] payload) {
@@ -71,9 +73,10 @@ public static VariableModification<byte[]> payload(final byte[] payload) {
7173
/**
7274
* *
7375
*
74-
* @param bytesToInsert bytes to xor
75-
* @param startPosition negative numbers mean that the position is taken
76-
* from the end
76+
* @param bytesToInsert
77+
* bytes to xor
78+
* @param startPosition
79+
* negative numbers mean that the position is taken from the end
7780
* @return variable modification
7881
*/
7982
public static VariableModification<byte[]> insert(final byte[] bytesToInsert, final int startPosition) {
@@ -83,9 +86,10 @@ public static VariableModification<byte[]> insert(final byte[] bytesToInsert, fi
8386
/**
8487
* * Deletes $count bytes from the input array beginning at $startPosition
8588
*
86-
* @param startPosition negative numbers mean that the position is taken
87-
* from the end
88-
* @param count number of bytes to be deleted
89+
* @param startPosition
90+
* negative numbers mean that the position is taken from the end
91+
* @param count
92+
* number of bytes to be deleted
8993
* @return variable modification
9094
*/
9195
public static VariableModification<byte[]> delete(final int startPosition, final int count) {
@@ -114,7 +118,8 @@ public static VariableModification<byte[]> explicitValueFromFile(int value) {
114118
/**
115119
* Shuffles the bytes in the array, given a specified array of positions.
116120
*
117-
* @param shuffle positions that define shuffling
121+
* @param shuffle
122+
* positions that define shuffling
118123
* @return shuffling variable modification
119124
*/
120125
public static VariableModification<byte[]> shuffle(final byte[] shuffle) {

0 commit comments

Comments
 (0)