forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf86e6ba
committed
Add runtime checks for number of query parameters passed to libpq functions.
The maximum number of parameters supported by the FE/BE protocol is 65535,as it's transmitted as a 16-bit unsigned integer. However, the nParamsarguments to libpq functions are all of type 'int'. We can't change thesignature of libpq functions, but a simple bounds check is in order to makeit more clear what's going wrong if you try to pass more than 65535parameters.Per complaint from Jim Vanns.1 parentc1774d2 commitf86e6ba
1 file changed
+22
-1
lines changedLines changed: 22 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1113 | 1113 |
| |
1114 | 1114 |
| |
1115 | 1115 |
| |
| 1116 | + | |
1116 | 1117 |
| |
1117 | 1118 |
| |
1118 | 1119 |
| |
| |||
1170 | 1171 |
| |
1171 | 1172 |
| |
1172 | 1173 |
| |
| 1174 | + | |
1173 | 1175 |
| |
1174 | 1176 |
| |
1175 | 1177 |
| |
1176 | 1178 |
| |
1177 | 1179 |
| |
1178 | 1180 |
| |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
1179 | 1187 |
| |
1180 | 1188 |
| |
1181 | 1189 |
| |
| |||
1203 | 1211 |
| |
1204 | 1212 |
| |
1205 | 1213 |
| |
| 1214 | + | |
1206 | 1215 |
| |
1207 | 1216 |
| |
1208 | 1217 |
| |
1209 | 1218 |
| |
1210 | 1219 |
| |
1211 | 1220 |
| |
1212 |
| - | |
1213 | 1221 |
| |
1214 | 1222 |
| |
1215 | 1223 |
| |
1216 | 1224 |
| |
1217 | 1225 |
| |
1218 | 1226 |
| |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
1219 | 1233 |
| |
1220 | 1234 |
| |
1221 | 1235 |
| |
| |||
1298 | 1312 |
| |
1299 | 1313 |
| |
1300 | 1314 |
| |
| 1315 | + | |
1301 | 1316 |
| |
1302 | 1317 |
| |
1303 | 1318 |
| |
1304 | 1319 |
| |
1305 | 1320 |
| |
1306 | 1321 |
| |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
1307 | 1328 |
| |
1308 | 1329 |
| |
1309 | 1330 |
| |
|
0 commit comments
Comments
(0)