Skip to content

Commit d26d63d

Browse files
Fix signed integer overflow in memory stream seek
1 parent 5868596 commit d26d63d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/streams/memory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ static int php_stream_memory_seek(php_stream *stream, zend_off_t offset, int whe
128128
switch(whence) {
129129
case SEEK_CUR:
130130
if (offset < 0) {
131-
if (ms->fpos < -(size_t)(offset)) {
131+
if (ms->fpos < -(size_t)offset) {
132132
ms->fpos = 0;
133133
*newoffs = -1;
134134
return -1;

0 commit comments

Comments
 (0)