forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commite9e63b7
committed
Fix inappropriate uses of PG_GETARG_UINT32()
The chr() function used PG_GETARG_UINT32() even though the argument isdeclared as (signed) integer. As a result, you can pass negativearguments to this function and it internally interprets them aspositive. Ultimately ends up being harmless, but it seems wrong, sofix this and rearrange the internal error checking a bit toaccommodate this.Another case was in the documentation, where example code usedPG_GETARG_UINT32() with an argument declared as signed integer.Reviewed-by: Nathan Bossart <bossartn@amazon.com>Discussion:https://www.postgresql.org/message-id/flat/7e43869b-d412-8f81-30a3-809783edc9a3%40enterprisedb.com1 parentd4596a2 commite9e63b7
File tree
2 files changed
+21
-14
lines changed- doc/src/sgml
- src/backend/utils/adt
2 files changed
+21
-14
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3193 | 3193 |
| |
3194 | 3194 |
| |
3195 | 3195 |
| |
3196 |
| - | |
| 3196 | + | |
3197 | 3197 |
| |
3198 | 3198 |
| |
3199 | 3199 |
| |
|
Lines changed: 20 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
999 | 999 |
| |
1000 | 1000 |
| |
1001 | 1001 |
| |
1002 |
| - | |
| 1002 | + | |
| 1003 | + | |
1003 | 1004 |
| |
1004 | 1005 |
| |
1005 | 1006 |
| |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
1006 | 1022 |
| |
1007 | 1023 |
| |
1008 | 1024 |
| |
| |||
1017 | 1033 |
| |
1018 | 1034 |
| |
1019 | 1035 |
| |
1020 |
| - | |
| 1036 | + | |
1021 | 1037 |
| |
1022 | 1038 |
| |
1023 | 1039 |
| |
| |||
1058 | 1074 |
| |
1059 | 1075 |
| |
1060 | 1076 |
| |
1061 |
| - | |
| 1077 | + | |
1062 | 1078 |
| |
1063 | 1079 |
| |
1064 | 1080 |
| |
1065 | 1081 |
| |
1066 | 1082 |
| |
1067 | 1083 |
| |
1068 |
| - | |
1069 |
| - | |
1070 |
| - | |
1071 |
| - | |
1072 |
| - | |
1073 |
| - | |
1074 |
| - | |
1075 |
| - | |
1076 |
| - | |
1077 | 1084 |
| |
1078 | 1085 |
| |
1079 | 1086 |
| |
1080 | 1087 |
| |
1081 | 1088 |
| |
1082 |
| - | |
| 1089 | + | |
1083 | 1090 |
| |
1084 | 1091 |
| |
1085 | 1092 |
| |
|
0 commit comments
Comments
(0)