• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

system/corennnnn


Commit MetaInfo

修订版8312fb4860c4b43c4cde77a08a6b6f135d89baa6 (tree)
时间2016-09-15 09:00:34
作者Linux Build Service Account <lnxbuild@loca...>
CommiterGerrit - the friendly Code Review server

Log Message

Merge "system/core: Replace banned strncpy with strlcpy function"

更改概述

差异

--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -173,8 +173,7 @@ void ifc_close6(void)
173173 static void ifc_init_ifr(const char *name, struct ifreq *ifr)
174174 {
175175 memset(ifr, 0, sizeof(struct ifreq));
176- strncpy(ifr->ifr_name, name, IFNAMSIZ);
177- ifr->ifr_name[IFNAMSIZ - 1] = 0;
176+ strlcpy(ifr->ifr_name, name, IFNAMSIZ);
178177 }
179178
180179 int ifc_get_hwaddr(const char *name, void *ptr)