Skip to content

Conversation

@zephyrbot
Copy link

@zephyrbot zephyrbot commented Jan 15, 2025

Backport 5a5f05b from #83572.

Fixes #83625

Fix incorrect nbytes_to_read calculation in ext2_inode_read() function.
Previously nbytes_to_read was decremented by read value which caused
incorrect calculation of bytes to read in subsequent iterations.
Now nbytes_to_read is decremented by to_read value which represents
the actual number of bytes read in current iteration.

This fixes potential data corruption issues when reading files from
ext2 filesystem.

Signed-off-by: Chen Shu <[email protected]>
(cherry picked from commit 5a5f05b)
@zephyrbot zephyrbot added Backport Backport PR and backport failure issues area: File System size: XS A PR changing only a single line of code labels Jan 15, 2025
@dkalowsk dkalowsk added this to the v4.0.1 milestone Jan 31, 2025
@mmahadevan108 mmahadevan108 merged commit 5080ba8 into v4.0-branch Feb 4, 2025
29 of 30 checks passed
@mmahadevan108 mmahadevan108 deleted the backport-83572-to-v4.0-branch branch February 4, 2025 22:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: File System Backport Backport PR and backport failure issues size: XS A PR changing only a single line of code

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants