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
Note that BDA::write doesn't write a BDA, but only the signature blocks in the static header which means that it really is in the wrong implementation.
There are two steps to this task:
Move the method to the StaticHeader implementation and fix up the call sites. Fix up the method header, which uses "BDA" when it should properly use "signature block". There may be mistaken inline comments as well that confuse the BDA with the signature block.
Make the method an instance method. That is, it should take a reference to self as an argument, it should not take a buffer as an argument, and it should construct the buffer it needs to write within the method body. The advantage of this is that the method StaticHeader::write created in the previous step can only write well-formed sigblocks to the designated locations, i.e., the program can not write arbitrary bytes to these spots. Fix up all call sites.
Note that BDA::write doesn't write a BDA, but only the signature blocks in the static header which means that it really is in the wrong implementation.
There are two steps to this task:
StaticHeader::write
created in the previous step can only write well-formed sigblocks to the designated locations, i.e., the program can not write arbitrary bytes to these spots. Fix up all call sites.Related: #1573.
The text was updated successfully, but these errors were encountered: