You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/home/phpfuzz/WorkSpace/flowfusion/php-src/ext/pdo_sqlite/sqlite_driver.c:304:37: runtime error: signed integer overflow: -9223372036854775808 * 1000 cannot be represented in type 'long'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /home/phpfuzz/WorkSpace/flowfusion/php-src/ext/pdo_sqlite/sqlite_driver.c:304
PHP Version
nightly
Operating System
No response
The text was updated successfully, but these errors were encountered:
@cmb69 Your patch looks right to me; I'd say feel free to PR this. I wonder if we should warn in that case to notify the user that no timeout actually was applied.
`::setAttribute(PDO::ATTR_TIMEOUT, …)` accepts a timeout in seconds,
but `sqlite3_busy_timeout()`[1] expects the timeout in milliseconds,
which is an `int`. To avoid signed overflow, we reject values larger
than the allowed range.
We also cater to negative values by simply clamping those to zero,
since `sqlite3_busy_timeout()` handles negative values the same as
zero.
[1] <https://www.sqlite.org/c3ref/busy_timeout.html>
Description
The following code:
Resulted in this output:
PHP Version
nightly
Operating System
No response
The text was updated successfully, but these errors were encountered: