Commit 9bc0dc4
Add null checks to prevent SIGSEGV when getTableByName returns null
When a table name stored in sqlite_master differs in case from the name
in the CREATE TABLE statement (e.g. databases created by Turso), the
getTableByName lookup could return a null TablePtr. Multiple call sites
dereferenced the result without checking for null, causing SIGSEGV
crashes.
This complements the case-insensitive lookup fix (commit 222e430) by
adding defensive null checks at all remaining unprotected call sites in
the browse data path and related operations.
Fixes #41101 parent 0db3147 commit 9bc0dc4
3 files changed
+48
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
897 | 897 | | |
898 | 898 | | |
899 | 899 | | |
900 | | - | |
| 900 | + | |
901 | 901 | | |
902 | | - | |
903 | | - | |
904 | | - | |
905 | | - | |
906 | | - | |
907 | | - | |
908 | | - | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
909 | 912 | | |
910 | 913 | | |
911 | 914 | | |
| |||
990 | 993 | | |
991 | 994 | | |
992 | 995 | | |
993 | | - | |
994 | | - | |
| 996 | + | |
| 997 | + | |
| 998 | + | |
| 999 | + | |
| 1000 | + | |
995 | 1001 | | |
996 | 1002 | | |
997 | 1003 | | |
| |||
1447 | 1453 | | |
1448 | 1454 | | |
1449 | 1455 | | |
1450 | | - | |
| 1456 | + | |
| 1457 | + | |
| 1458 | + | |
| 1459 | + | |
1451 | 1460 | | |
1452 | 1461 | | |
1453 | 1462 | | |
| |||
1548 | 1557 | | |
1549 | 1558 | | |
1550 | 1559 | | |
1551 | | - | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
1552 | 1564 | | |
1553 | 1565 | | |
1554 | 1566 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1333 | 1333 | | |
1334 | 1334 | | |
1335 | 1335 | | |
1336 | | - | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
1337 | 1340 | | |
1338 | 1341 | | |
1339 | 1342 | | |
| |||
1375 | 1378 | | |
1376 | 1379 | | |
1377 | 1380 | | |
1378 | | - | |
1379 | | - | |
| 1381 | + | |
| 1382 | + | |
1380 | 1383 | | |
1381 | | - | |
1382 | | - | |
1383 | | - | |
1384 | | - | |
1385 | | - | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
| 1388 | + | |
| 1389 | + | |
| 1390 | + | |
| 1391 | + | |
| 1392 | + | |
1386 | 1393 | | |
1387 | 1394 | | |
1388 | 1395 | | |
| |||
1789 | 1796 | | |
1790 | 1797 | | |
1791 | 1798 | | |
1792 | | - | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
1793 | 1802 | | |
1794 | 1803 | | |
1795 | 1804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
135 | 141 | | |
136 | 142 | | |
137 | 143 | | |
| |||
0 commit comments