mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-17 09:21:35 +00:00
37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
From a492e0c076a5fd4b8740e53d1d0a56f086f488d9 Mon Sep 17 00:00:00 2001
|
|
From: Guojun Jin <gjin@codeaurora.org>
|
|
Date: Thu, 20 Dec 2018 12:34:26 -0800
|
|
Subject: [PATCH 240/281] replace banned func strncpy with strlcpy
|
|
|
|
Change-Id: Ida548ee57024d31f6b2c5390d96c210f40841ad2
|
|
Signed-off-by: Guojun Jin <gjin@codeaurora.org>
|
|
---
|
|
net/netfilter/x_tables.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
|
|
index 470282cf3fae..8a4595594bf2 100644
|
|
--- a/net/netfilter/x_tables.c
|
|
+++ b/net/netfilter/x_tables.c
|
|
@@ -768,7 +768,7 @@ void xt_compat_match_from_user(struct xt_entry_match *m, void **dstptr,
|
|
m->u.user.match_size = msize;
|
|
strscpy(name, match->name, sizeof(name));
|
|
module_put(match->me);
|
|
- strncpy(m->u.user.name, name, sizeof(m->u.user.name));
|
|
+ strlcpy(m->u.user.name, name, sizeof(m->u.user.name));
|
|
|
|
*size += off;
|
|
*dstptr += msize;
|
|
@@ -1148,7 +1148,7 @@ void xt_compat_target_from_user(struct xt_entry_target *t, void **dstptr,
|
|
t->u.user.target_size = tsize;
|
|
strscpy(name, target->name, sizeof(name));
|
|
module_put(target->me);
|
|
- strncpy(t->u.user.name, name, sizeof(t->u.user.name));
|
|
+ strlcpy(t->u.user.name, name, sizeof(t->u.user.name));
|
|
|
|
*size += off;
|
|
*dstptr += tsize;
|
|
--
|
|
2.17.1
|
|
|