18 lines
547 B
Diff
18 lines
547 B
Diff
--- a/kernel/pf_ring.c 2024-04-23 15:08:30.507723558 +0300
|
|
+++ b/kernel/pf_ring.c 2024-04-23 15:12:01.691672911 +0300
|
|
@@ -5557,12 +5557,12 @@
|
|
* Check legality
|
|
*/
|
|
if (addr_len == sizeof(struct sockaddr)) {
|
|
- char name[sizeof(sa->sa_data)+1];
|
|
+ char name[sizeof(sa->sa_data_min)+1];
|
|
|
|
if (sa->sa_family != PF_RING)
|
|
return(-EINVAL);
|
|
|
|
- memcpy(name, sa->sa_data, sizeof(sa->sa_data));
|
|
+ memcpy(name, sa->sa_data, sizeof(sa->sa_data_min));
|
|
|
|
/* Add trailing zero if missing */
|
|
name[sizeof(name)-1] = '\0';
|