sqlite segv
Đang mở
Bug
Extension: sqlite3
Status: Verified
- Ngôn ngữ chính
- C
- Star
- 40.4k
- Fork
- 8.2k
- Merge trung bình
- 2 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 96
Mô tả
Description
The following code:
<?php
$db = new SQLite3(':memory:');
$db->createFunction('evil', function () {
global $stmt;
$stmt->close();
return 1;
});
$stmt = $db->prepare("SELECT evil()");
$res = $stmt->execute();
Resulted in this output (truncated):
==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000063 ... READ
#0 sqlite3ApiExit (libsqlite3.so.0+0x912b4)
#1 sqlite3_step (libsqlite3.so.0+0xe1fb0)
#2 zim_SQLite3Stmt_execute ext/sqlite3/sqlite3.c:1901:16
PHP Version
8.6.0-dev
Operating System
Ubuntu 22.04
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.