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

Closed
wants to merge 1 commit into from
Closed

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
@lisicky lisicky added this to the 12.0.0 milestone Aug 28, 2024
@lisicky
Copy link
Contributor

lisicky commented Aug 28, 2024

Thanks @klntsky it was already in Conway's branch. Already in the latest release

@lisicky lisicky closed this Aug 28, 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.

2 participants