File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -346,7 +346,12 @@ library RLP {
346346 return string (readBytes (item));
347347 }
348348
349- /// @dev Decodes an RLP encoded list into an array of RLP Items.
349+ /**
350+ * @dev Decodes an RLP encoded list in a memory slice into an array of RLP Items.
351+ *
352+ * NOTE: The returned array contains slice references into the original payload, not copied bytes. Any further
353+ * modification of the input buffer may cause the output result to become invalid.
354+ */
350355 function readList (Memory.Slice item ) internal pure returns (Memory.Slice[] memory list ) {
351356 uint256 itemLength = item.length ();
352357
@@ -413,7 +418,12 @@ library RLP {
413418 return readString (item.asSlice ());
414419 }
415420
416- /// @dev Decode an RLP encoded list from bytes. See {readList}
421+ /**
422+ * @dev Decode an RLP encoded list from bytes. See {readList}
423+ *
424+ * NOTE: The returned array contains slice references into the original payload, not copied bytes. Any further
425+ * modification of the input buffer may cause the output result to become invalid.
426+ */
417427 function decodeList (bytes memory value ) internal pure returns (Memory.Slice[] memory ) {
418428 return readList (value.asSlice ());
419429 }
You can’t perform that action at this time.
0 commit comments