You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Short term, verify that the input for the TxPointer parsing function contains only single byte characters.
Long term, consider enabling the Clippy rule string_slice.
The text was updated successfully, but these errors were encountered:
Description
The decoding of a TxPointer might panic if the input string contains multi-byte characters. The following code shows a unit test which panics.
Figure 33.1: Unit test that panics.
The next figure highlights the string-slice operation which causes the panic.
Figure 33.2: Decoding function from strings to TxPointer. (fuel-vm/fuel-tx/src/tx_pointer.rs/#92–107)
Recommendations
Short term, verify that the input for the TxPointer parsing function contains only single byte characters.
Long term, consider enabling the Clippy rule string_slice.
The text was updated successfully, but these errors were encountered: