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

Fix GH-17463: SplTempFileObject::ftruncate() segfault on negative len… #17465

Closed
wants to merge 1 commit into from

Conversation

devnexen
Copy link
Member

…gth.

@devnexen devnexen requested a review from Girgias as a code owner January 13, 2025 18:10
@devnexen devnexen linked an issue Jan 13, 2025 that may be closed by this pull request
Comment on lines 2709 to 2714
if (size < 0) {
zend_argument_value_error(1, "must be greater or equal to 0");
RETURN_THROWS();
}

CHECK_SPL_FILE_OBJECT_IS_INITIALIZED(intern);
Copy link
Member

Choose a reason for hiding this comment

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

I think this should be after CHECK_SPL_FILE_OBJECT_IS_INITIALIZED() to be consistent with other methods (e.g. the seek one just below)

@devnexen devnexen requested a review from bukka as a code owner January 14, 2025 12:20
Comment on lines 4 to 8
#define PHP_MINOR_VERSION 3
#define PHP_RELEASE_VERSION 17
#define PHP_MINOR_VERSION 5
#define PHP_RELEASE_VERSION 0
#define PHP_EXTRA_VERSION "-dev"
#define PHP_VERSION "8.3.17-dev"
#define PHP_VERSION_ID 80317
#define PHP_VERSION "8.5.0-dev"
#define PHP_VERSION_ID 80500
Copy link
Member

Choose a reason for hiding this comment

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

Revert this ;)

@@ -0,0 +1,16 @@
--TEST--
GH-15918 (Assertion failure in ext/spl/spl_fixedarray.c)
Copy link
Member

Choose a reason for hiding this comment

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

Test name is wrong

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes :) will fix the description no worries

@devnexen
Copy link
Member Author

Merged with e4473ab

@devnexen devnexen closed this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SEGV SplTempFileObject ftruncate negative
4 participants