Skip to content

Commit

Permalink
Merge pull request #450 from s-hadinger/bytes_avoid_crash_item
Browse files Browse the repository at this point in the history
Avoid crash in item
  • Loading branch information
skiars authored Nov 6, 2024
2 parents 4baac67 + b9a7d33 commit 96bb7ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/be_byteslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,6 +1180,7 @@ static int m_item(bvm *vm)
{
int argc = be_top(vm);
buf_impl attr = bytes_check_data(vm, 0); /* we reserve 4 bytes anyways */
check_ptr(vm, &attr);
if (argc >=2 && be_isint(vm, 2)) { /* single byte */
int index = be_toint(vm,2);
if (index < 0) {
Expand Down

0 comments on commit 96bb7ba

Please sign in to comment.