Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panicked at src/byte_functions/mod.rs:41:17 #51

Open
ckcr4lyf opened this issue Sep 10, 2024 · 0 comments
Open

panicked at src/byte_functions/mod.rs:41:17 #51

ckcr4lyf opened this issue Sep 10, 2024 · 0 comments

Comments

@ckcr4lyf
Copy link
Owner

Also happens at 57:17.

Logs:

thread 'actix-rt|system:0|arbiter:0' panicked at src/byte_functions/mod.rs:57:17:
index out of bounds: the len is 40 but the index is 40
thread 'actix-rt|system:0|arbiter:0' panicked at src/byte_functions/mod.rs:41:17:
index out of bounds: the len is 40 but the index is 40

Code:

0x25 => {
hex_str_bytes[pos_hex_str] = (raw[pos_urlenc+1] | 0b0010_0000) & 0b0111_1111;
hex_str_bytes[pos_hex_str+1] = (raw[pos_urlenc+2] | 0b0010_0000) & 0b0111_1111;
pos_hex_str += 2;
pos_urlenc += 3;
},

// Get nibbles' hex characters
hex_str_bytes[pos_hex_str] = nibble_to_ascii(left_nibble);
hex_str_bytes[pos_hex_str+1] = nibble_to_ascii(right_nibble);
pos_hex_str += 2;
pos_urlenc += 1;

Should fix it probably...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant