Commit 82c117c
committed
Fix pnstrdup() to not memcpy() the maximum allowed length.
The previous behaviour was dangerous if the length passed wasn't the
size of the underlying buffer, but the maximum size of the underlying
buffer.
Author: Andres Freund
Discussion: https://postgr.es/m/20161003215524.mwz5p45pcverrkyk@alap3.anarazel.de1 parent 8a24179 commit 82c117c
1 file changed
+6
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
1086 | 1087 | | |
1087 | 1088 | | |
1088 | 1089 | | |
1089 | | - | |
| 1090 | + | |
1090 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
1091 | 1095 | | |
1092 | 1096 | | |
| 1097 | + | |
1093 | 1098 | | |
1094 | 1099 | | |
1095 | 1100 | | |
| |||
0 commit comments