Skip to content

avoid use of uninitialized value in tdefl_record_literal#189

Merged
uroni merged 1 commit into
richgel999:masterfrom
maroneze:master
Jun 27, 2021
Merged

avoid use of uninitialized value in tdefl_record_literal#189
uroni merged 1 commit into
richgel999:masterfrom
maroneze:master

Conversation

@maroneze

Copy link
Copy Markdown

In tdefl_record_literal, the following expression may read an uninitialized value in the m_pLZ_flags field:

*d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1);

By explicitly initializing the field, we avoid possible undefined behaviors.
Issue found with Frama-C.

In tdefl_record_literal, the following expression may read an uninitialized
value in the m_pLZ_flags field:

*d->m_pLZ_flags = (mz_uint8)(*d->m_pLZ_flags >> 1);

By explicitly initializing it, we avoid possible undefined behaviors.
Issue found with Frama-C.
@uroni uroni merged commit 61b202f into richgel999:master Jun 27, 2021
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