Projects
openEuler:24.03:SP1:Everything
net-tools
_service:tar_scm:fix-ifconfig-display-error-whe...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:fix-ifconfig-display-error-when-the-length-of-interface-name-is-15.patch of Package net-tools
From bf7cc74cd048bfd9d1fb9474e94a915cc9e86fdb Mon Sep 17 00:00:00 2001 From: eaglegai <eaglegai@163.com> Date: Fri, 2 Dec 2022 09:47:06 +0800 Subject: [PATCH] fix ifconfig display error when the length of interface name is 15 Signed-off-by: eaglegai <eaglegai@163.com> --- lib/interface.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/interface.c b/lib/interface.c index baa9a9a..f321340 100644 --- a/lib/interface.c +++ b/lib/interface.c @@ -248,8 +248,10 @@ static const char *get_name(char **namep, const char *p) } *name++ = *p++; count++; - if (count == (IFNAMSIZ-1)) + if (count == (IFNAMSIZ-1)) { + p++; break; + } } *name++ = '\0'; return p; -- 2.33.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2