Skip to content

check value tag value in get_value_data_size and get_value_data#2

Open
SABITHSAHEB wants to merge 1 commit into
libyal:mainfrom
SABITHSAHEB:property-data-value-check
Open

check value tag value in get_value_data_size and get_value_data#2
SABITHSAHEB wants to merge 1 commit into
libyal:mainfrom
SABITHSAHEB:property-data-value-check

Conversation

@SABITHSAHEB

Copy link
Copy Markdown
  1. get_value_data_size and get_value_data subtract 1 from value_size before checking the value is set.
  2. an empty element leaves value NULL and value_size 0, so value_size - 1 wraps to SIZE_MAX.
    Added the same value == NULL guard get_value_integer and get_value_string already have.

@joachimmetz

Copy link
Copy Markdown
Member

Wouldn't the successive call to libuna fail because of value_data being NULL? What are you specifically worried about for this codepath? The debug output?

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