forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit13bba02
committed
Avoid calling memcpy() with a NULL source pointer and count == 0.
As in commit0a52d37, avoid doing something that has undefinedresults according to the C standard, even though in practice there doesnot seem to be any problem with it.This fixes two places in numeric.c that demonstrably could call memcpy()with such arguments. I looked through that file and didn't see any otherplaces with similar hazards; this is not to claim that there are not suchplaces in other files.Per report from Piotr Stefaniak. Back-patch to 9.5 which is where theprevious commit was added. We're more or less setting a precedent thatwe will not worry about this type of issue in pre-9.5 branches unlesssomeone demonstrates a problem in the field.1 parentcb3384a commit13bba02
1 file changed
+5
-2
lines changedLines changed: 5 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4769 | 4769 |
| |
4770 | 4770 |
| |
4771 | 4771 |
| |
4772 |
| - | |
| 4772 | + | |
| 4773 | + | |
| 4774 | + | |
4773 | 4775 |
| |
4774 | 4776 |
| |
4775 | 4777 |
| |
| |||
5090 | 5092 |
| |
5091 | 5093 |
| |
5092 | 5094 |
| |
5093 |
| - | |
5094 | 5095 |
| |
| 5096 | + | |
| 5097 | + | |
5095 | 5098 |
| |
5096 | 5099 |
| |
5097 | 5100 |
| |
|
0 commit comments
Comments
(0)