diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp index 718add2434b..a11d7d3bc65 100644 --- a/Kernel/FileSystem/FileDescription.cpp +++ b/Kernel/FileSystem/FileDescription.cpp @@ -138,6 +138,8 @@ off_t FileDescription::seek(off_t offset, int whence) new_offset = offset; break; case SEEK_CUR: + if (Checked::addition_would_overflow(m_current_offset, offset)) + return -EOVERFLOW; new_offset = m_current_offset + offset; break; case SEEK_END: