Commit 62e83b3
src: Malloc/Calloc size 0 returns non-null pointer
Change `Malloc()/Calloc()` so that size zero does not return a null
pointer, consistent with prior behavior.
Fixes: #8571
PR-URL: #8572
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@keybase.io>
Reviewed-By: Yorkie Liu <yorkiefixer@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>1 parent 51e09d0 commit 62e83b3Copy full SHA for 62e83b3
File tree
Expand file treeCollapse file tree
3 files changed
+25
-1
lines changedOpen diff view settings
Filter options
- src
- test
- cctest
- parallel
Expand file treeCollapse file tree
3 files changed
+25
-1
lines changedOpen diff view settings
Collapse file
+3-1Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
234 | 234 | |
235 | 235 | |
236 | 236 | |
| 237 | + |
237 | 238 | |
238 | 239 | |
239 | 240 | |
240 | 241 | |
241 | | - |
| 242 | + |
| 243 | + |
242 | 244 | |
243 | 245 | |
244 | 246 | |
|
Collapse file
+14Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
74 | 74 | |
75 | 75 | |
76 | 76 | |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
Collapse file
test/parallel/test-crypto-pbkdf2.js
Copy file name to clipboardExpand all lines: test/parallel/test-crypto-pbkdf2.js+8Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
79 | 79 | |
80 | 80 | |
81 | 81 | |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
0 commit comments