Commit 3626397
committed
Fix buffer overflow
When compiling, the following warning message is generated:
"warning: ‘strncpy’ writing 1040 bytes into a region of size
1024 overflows the destination"
This is because calloc allocates NLMSG_SPACE(MAX_PAYLOAD)
space for nlh, which includes the space for the header,
so the actual space available for the message is only
MAX_PAYLOAD.1 parent 35ca058 commit 3626397
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
0 commit comments