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

CA-221864: Fix bugs in vhd_journal_read_locators() #218

Closed
wants to merge 1 commit into from

Conversation

kostaslambda
Copy link
Contributor

  • Return value from vhd_journal_position() not checked;
    ensure it is valid before continuing
  • In case of error inside the for loop, always free 'buf';
    if 'NULL', memory has not been allocated (1st iter) or the
    pointer is already added to '_locators' (all other iters);
    if not 'NULL', pointer not copied to '_locators' yet

Signed-off-by: Kostas Ladopoulos konstantinos.ladopoulos@citrix.com

Copy link
Contributor

@stefanopanella stefanopanella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@stefanopanella
Copy link
Contributor

Reviewed-by: Stefano Panella

- Return value from vhd_journal_position() not checked;
  ensure it is valid before continuing

- In case of error inside the for loop, always free 'buf';
  if 'NULL', memory has not been allocated (1st iter) or the
  pointer is already added to '_locators' (all other iters);
  if not 'NULL', pointer not copied to '_locators' yet

Signed-off-by: Kostas Ladopoulos <konstantinos.ladopoulos@citrix.com>
Reviewed-by: Stefano Panella <stefano.panella@citrix.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants