The sized buffers are TPM2B types which can contain data of different length (such as TPM2B_NAME or TPM2B_DIGEST). The current macro handles them well by checking that when the native type is created the size of the data does not exceed the maximum size.
But for other buffer types (such as TPM2B_SENSITIVE_DATA) they usually have a fixed size so the macro that creates them should probably behave differently by checking that the size of the data equals the expected size and if it does not it is an error.
The sized buffers are TPM2B types which can contain data of different length (such as TPM2B_NAME or TPM2B_DIGEST). The current macro handles them well by checking that when the native type is created the size of the data does not exceed the maximum size.
But for other buffer types (such as TPM2B_SENSITIVE_DATA) they usually have a fixed size so the macro that creates them should probably behave differently by checking that the size of the data equals the expected size and if it does not it is an error.