Commit c71271e
Fix: tde encrypt buffer context don't use share memory
Now we Fix: tde encrypt buffer context don't use share memory
We did not calculate the size of shared memory for BufEncCtx and BufDecCtx
in the CreateSharedMemoryAndMemories function, which is a potential issue.
There is actually no need to use shared memory here, as the parent process
does not read the values of BufEncCtx and BufDecCtx. When we use AES algorithm
the BufEncCtx and BufDecCtx also does not use shared memory. In order to
maintain a consistent code style,we use malloc. cann't use palloc to apply
for memory here, as TopmemoryContext is NULL during initialization and
the memoryContext has not been setted yet.1 parent 66eedec commit c71271e
1 file changed
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
53 | 70 | | |
54 | | - | |
55 | | - | |
56 | | - | |
| 71 | + | |
| 72 | + | |
57 | 73 | | |
58 | | - | |
59 | | - | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
| |||
0 commit comments