Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 746 - ifconfig does something stupid.
Summary: ifconfig does something stupid.
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: net-tools
Version: 5.2
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Crutcher Dunnavant
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 1999-01-08 21:44 UTC by Peter Jones
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 1999-01-12 14:10:35 UTC

Attachments (Terms of Use)

Description Peter Jones 1999-01-08 21:44:18 UTC
fuzzball:~$ /sbin/ifconfig 1234567890123456
1234567890123456=4`@q?H#: unknown interface.

Here's the diff to fix it:

--- ifconfig.c       Fri Jan  8 16:39:25 1999
+++ ifconfig.c  Fri Jan  8 16:40:44 1999
@@ -496,7 +496,8 @@

   /* No. Fetch the interface name. */
   spp = argv;
-  strncpy(ifr.ifr_name, *spp++, IFNAMSIZ);
+  strncpy(ifr.ifr_name, *spp++, IFNAMSIZ-1);
+  ifr.ifr_name[IFNAMSIZ-1]=0;
   if (*spp == (char *)NULL) {
     (void) close(skfd);

Comment 1 David Lawrence 1999-01-08 23:14:59 UTC
This has been verified to act as the user reports. It is being
assigned to a developer.

Comment 2 Jeff Johnson 1999-01-12 14:10:59 UTC
Already fixed in net-tools-1.49-2.

Note You need to log in before you can comment on or make changes to this bug.