forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitb34c8ec
committed
From: James Hughes <jamesh@interpath.com>
This is a patch to fix crashes in psql when executing queries froman external file. The code also adds error checking to verify thatmemory for "query" was allocated. The conditional for the block ofcode was changed from "query == NULL" to "query_alloced == false".The conditional, "query == NULL", was never true. This preventedthe memory being allocated for "query". A few lines later, an attemptto write to an un-allocated memory area generated a SIGSEGV causingthe frontend to crash.1 parentb8476a0 commitb34c8ec
1 file changed
+9
-4
lines changedLines changed: 9 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
2093 | 2093 |
| |
2094 | 2094 |
| |
2095 | 2095 |
| |
2096 |
| - | |
| 2096 | + | |
2097 | 2097 |
| |
2098 |
| - | |
2099 |
| - | |
| 2098 | + | |
| 2099 | + | |
| 2100 | + | |
| 2101 | + | |
| 2102 | + | |
| 2103 | + | |
| 2104 | + | |
2100 | 2105 |
| |
2101 | 2106 |
| |
2102 | 2107 |
| |
|
0 commit comments
Comments
(0)