Skip to content

Commit 093ca31

Browse files
author
HD Moore
committed
The InvalidPayloadSizeException wasn't actually defined anywhere
1 parent b0a8c77 commit 093ca31

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

modules/encoders/mipsbe/byte_xori.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def decoder_stub(state)
4444
# add 4 number of passes for the space reserved for the key, at the end of the decoder stub
4545
# (see commented source)
4646
number_of_passes=state.buf.length+4
47-
raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766
47+
raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766
4848

4949
# 16-bits not (again, see also commented source)
5050
reg_14 = (number_of_passes+1)^0xFFFF

modules/encoders/mipsbe/longxor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def decoder_stub(state)
3535

3636
# add one xor operation for the key (see comment below)
3737
number_of_passes=state.buf.length/4+1
38-
raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240
39-
raise InvalidPayloadSizeException.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0
38+
raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240
39+
raise EncodingError.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0
4040

4141
# 16-bits not (again, see below)
4242
reg_14 = (number_of_passes+1)^0xFFFF

modules/encoders/mipsle/byte_xori.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def decoder_stub(state)
4444
# add 4 number of passes for the space reserved for the key, at the end of the decoder stub
4545
# (see commented source)
4646
number_of_passes=state.buf.length+4
47-
raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766
47+
raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 32766
4848

4949
# 16-bits not (again, see also commented source)
5050
reg_14 = (number_of_passes+1)^0xFFFF

modules/encoders/mipsle/longxor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ def decoder_stub(state)
3535

3636
# add one xor operation for the key (see comment below)
3737
number_of_passes=state.buf.length/4+1
38-
raise InvalidPayloadSizeException.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240
39-
raise InvalidPayloadSizeException.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0
38+
raise EncodingError.new("The payload being encoded is too long (#{state.buf.length} bytes)") if number_of_passes > 10240
39+
raise EncodingError.new("The payload is not padded to 4-bytes (#{state.buf.length} bytes)") if state.buf.length%4 != 0
4040

4141
# 16-bits not (again, see below)
4242
reg_14 = (number_of_passes+1)^0xFFFF

0 commit comments

Comments
 (0)