Commit 365ea5d
committed
filter: fix theoretical overread on long records
The concern is that the read length can be longer than MAX_AUDIT_MESSAGE_LENGTH. If that were the case, the strncpy keeps it the right size, but len is not adjusted. Which can lead to an overread later.
In practice, MAX_AUDIT_MESSAGE_LENGTH was selected as the limit for records throughout the audit system. Unless you're dealing with a corrupted record, this should never happen.1 parent d043dfb commit 365ea5d
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| 130 | + | |
| 131 | + | |
130 | 132 | | |
131 | 133 | | |
132 | 134 | | |
133 | 135 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
138 | 142 | | |
139 | 143 | | |
140 | 144 | | |
| |||
0 commit comments