Skip to content

Commit 8a5ada4

Browse files
committed
Merge branch 'PHP-8.3'
* PHP-8.3: Revert "Fix phpGH-15980: Signed integer overflow in main/streams/streams.c"
2 parents 10008fb + a9fcf49 commit 8a5ada4

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

NEWS

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ PHP NEWS
6262
- Streams:
6363
. Fixed bugs GH-15908 and GH-15026 (leak / assertion failure in streams.c).
6464
(nielsdos)
65-
. Fixed bug GH-15980 (Signed integer overflow in main/streams/streams.c).
66-
(cmb)
6765

6866
- TSRM:
6967
. Prevent closing of unrelated handles. (cmb)

ext/standard/tests/streams/gh15980.phpt

Lines changed: 0 additions & 11 deletions
This file was deleted.

main/streams/streams.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,13 +1382,8 @@ PHPAPI int _php_stream_seek(php_stream *stream, zend_off_t offset, int whence)
13821382

13831383
switch(whence) {
13841384
case SEEK_CUR:
1385-
ZEND_ASSERT(stream->position >= 0);
1386-
if (UNEXPECTED(offset > ZEND_LONG_MAX - stream->position)) {
1387-
offset = ZEND_LONG_MAX;
1388-
} else {
1389-
offset = stream->position + offset;
1390-
}
1391-
whence = SEEK_SET;
1385+
offset = stream->position + offset;
1386+
whence = SEEK_SET;
13921387
break;
13931388
}
13941389
ret = stream->ops->seek(stream, offset, whence, &stream->position);

0 commit comments

Comments
 (0)