Repository navigation
Commit e00aab5
committed
ext/pdo_firebird: Fix DPB stack overflow on long connection parameters
slprintf() stores its terminating NUL within the size it is given, and the
DPB is written from offset 1 of a 256-byte buffer with a size of 256, so a
user name, password, charset, or role that filled the buffer wrote one byte
past its end. A value longer than 255 bytes also had its one-byte length
truncated. Reject such values with a PDOException before writing them.1 parent a2011db commit e00aab5
3 files changed
Lines changed: 48 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1376 | 1376 | | |
1377 | 1377 | | |
1378 | 1378 | | |
1379 | | - | |
1380 | 1379 | | |
1381 | 1380 | | |
1382 | 1381 | | |
| |||
1409 | 1408 | | |
1410 | 1409 | | |
1411 | 1410 | | |
| 1411 | + | |
| 1412 | + | |
| 1413 | + | |
1412 | 1414 | | |
1413 | 1415 | | |
1414 | 1416 | | |
| |||
1418 | 1420 | | |
1419 | 1421 | | |
1420 | 1422 | | |
1421 | | - | |
1422 | | - | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
1423 | 1433 | | |
1424 | 1434 | | |
1425 | 1435 | | |
1426 | 1436 | | |
1427 | 1437 | | |
1428 | 1438 | | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
1429 | 1443 | | |
1430 | 1444 | | |
1431 | 1445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
0 commit comments