Commit ec8acc9
committed
Fix memory allocation for wpe_pasteboard_string
The "data" member of wpe_pasteboard_string is a dynamically allocated
array of characters, and allocated size must be "sizeof(char) * in_length".
Also, calloc() already computes the final size itself, so pass the
"in_length" parameter as the number of elements, and "sizeof(char)" as
the element size.1 parent 4b9fd32 commit ec8acc9
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments