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

Check resumeable file pointer with fstat. #933

Merged
merged 1 commit into from
May 27, 2017
Merged

Conversation

robinlinden
Copy link
Member

@robinlinden robinlinden commented May 27, 2017

This hopefully fixes a crash where uTox tries to fseek an invalid file pointer.


This change is Reviewable

@GrayHatter
Copy link
Member

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


src/file_transfers.c, line 197 at r1 (raw file):

    }

    // This file pointer has a tendency of being both invalid and non-null so we use fstat to check it.

In this case it' getting bad data, which shouldn't be happening. Did you try to find the source of the bad data?

I'm okay with this pull either way, but this seems to be a bandaid, rather than sutures.


Comments from Reviewable

@robinlinden
Copy link
Member Author

Review status: all files reviewed at latest revision, 1 unresolved discussion.


src/file_transfers.c, line 197 at r1 (raw file):

Previously, GrayHatter (Gregory Mullen) wrote…

In this case it' getting bad data, which shouldn't be happening. Did you try to find the source of the bad data?

I'm okay with this pull either way, but this seems to be a bandaid, rather than sutures.

Yeah, I tried to find the source before I resorted to this. I figured fixing the crash while still getting info about how often it is happening is good enough for now.


Comments from Reviewable

@GrayHatter
Copy link
Member

:lgtm:


Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@e0ff
Copy link
Member

e0ff commented May 27, 2017

:lgtm:


Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@e0ff e0ff merged commit 6690e2a into uTox:develop May 27, 2017
@robinlinden robinlinden deleted the ft-crash branch August 26, 2017 13:09
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