Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Jan 2001 11:40:03 -0800 (PST)
From:      Dima Dorfman <dima@unixfreak.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/24677: "mdconfig -t vnode -f floppy.bin" seg fault's 
Message-ID:  <200101271940.f0RJe3m54594@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/24677; it has been noted by GNATS.

From: Dima Dorfman <dima@unixfreak.org>
To: sydney13@mail.com
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: bin/24677: "mdconfig -t vnode -f floppy.bin" seg fault's 
Date: Sat, 27 Jan 2001 11:34:59 -0800

 > 
 > >Number:         24677
 > >Category:       bin
 > >Synopsis:       "mdconfig -t vnode -f floppy.bin" seg fault's
 > >How-To-Repeat:
 > Use the FreeBSD boot floppy image (or any other) and do:
 > 
 > mdconfig -a -t vnode -f boot.flp -u 0
 
 I was just going to mail a fix for this to -current or -hackers.  It's
 attached below if you want to test it.
 
 The problem is that mdconfig thinks md_file in struct mdioctl is an
 array while it's really a pointer.
 
 					Dima Dorfman
 					dima@unixfreak.org
 
 > >Fix:
 
 Index: mdconfig.c
 ===================================================================
 RCS file: /st/src/FreeBSD/src/sbin/mdconfig/mdconfig.c,v
 retrieving revision 1.4
 diff -u -r1.4 mdconfig.c
 --- mdconfig.c	2001/01/01 23:08:20	1.4
 +++ mdconfig.c	2001/01/27 19:32:40
 @@ -84,7 +84,7 @@
  		case 'f':
  			if (cmdline != 2)
  				usage();
 -			strncpy(mdio.md_file, optarg, sizeof(mdio.md_file) - 1);
 +			mdio.md_file = optarg;
  			break;
  		case 'o':
  			if (cmdline != 2)
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101271940.f0RJe3m54594>