Skip to content

Correct file read offset to prevent infinite loop - #5360

Merged
kaidokert merged 1 commit into
youtube:25.lts.1+from
msolya:fix_net_test_4
May 21, 2025
Merged

kaidokert merged 1 commit into
youtube:25.lts.1+from
msolya:fix_net_test_4

Conversation

@msolya

@msolya msolya commented Apr 10, 2025

Copy link
Copy Markdown
Collaborator

b/219056504

In FileNetLogObserver, the previous code always read from offset 0 within the file reading loop, leading to an infinite loop if the first read was successful.

This change introduces and increments an offset variable to ensure the entire file is read sequentially.

Change-Id: I09b4f7801bd7ac66dceaaee320e01214659ba5f8

@msolya
msolya requested a review from amurovanyi April 10, 2025 08:21

@amurovanyi amurovanyi left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@amurovanyi
amurovanyi requested a review from kaidokert April 10, 2025 11:37
b/219056504

In FileNetLogObserver, the previous code always read from offset 0
within the file reading loop, leading to an infinite loop if the
first read was successful.

This change introduces and increments an offset variable to ensure
the entire file is read sequentially.

Change-Id: I09b4f7801bd7ac66dceaaee320e01214659ba5f8

@kaidokert kaidokert left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@kaidokert
kaidokert enabled auto-merge (squash) May 21, 2025 17:23
@kaidokert
kaidokert merged commit f966266 into youtube:25.lts.1+ May 21, 2025
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.

3 participants