Skip to content

Commit 5b45831

Browse files
committed
add data length check too in case rent is 0
Signed-off-by: ivypowered <[email protected]>
1 parent ce492b1 commit 5b45831

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

stdlib/solana.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,9 @@ uint64_t entrypoint(const uint8_t *input)
5757
return 1;
5858
}
5959
uint64_t lamports = *params.ka[0].lamports;
60+
uint64_t data_len = params.ka[0].data_len;
6061
// if account is uninitialized, we can skip owner checks
61-
if (lamports > 0) {
62+
if (lamports > 0 || data_len > 0) {
6263
SolPubkey* owner = params.ka[0].owner;
6364
SolPubkey* program_id = params.program_id;
6465
if (!owner || !program_id) {

0 commit comments

Comments
 (0)