Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use after free #670

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix use after free #670

wants to merge 1 commit into from

Conversation

klntsky
Copy link

@klntsky klntsky commented Apr 8, 2024

The value is moved and freed.

Repro:

const csl = await import ('@emurgo/cardano-serialization-lib-nodejs');

let body = csl.TransactionBody.new(
  csl.TransactionInputs.new(),
  csl.TransactionOutputs.new(),
  csl.BigNum.from_str('1')
);

let interval = csl.BigNum.one();
body.set_validity_start_interval_bignum(interval);
let witnessSet = csl.TransactionWitnessSet.new();
let tx = csl.Transaction.new(body, witnessSet);

setInterval(() => {
  console.log(interval.to_bytes());
} , 1000);

The value is moved and freed
klntsky added a commit to mlabs-haskell/purescript-cardano-types that referenced this pull request Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant