Subject: Re: MSDOSFS: Bug in unix2dosfn()
To: None <mikeh@hds.com>
From: Charles M. Hannum <mycroft@gnu.ai.mit.edu>
List: netbsd-bugs
Date: 08/29/1994 21:28:37
I fixed this a bit differently:

===================================================================
RCS file: /b/source/CVS/src/sys/msdosfs/msdosfs_conv.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -c -2 -r1.6 -r1.7
*** 1.6	1994/06/29 06:35:35
--- 1.7	1994/08/30 01:31:11
***************
*** 1,3 ****
! /*	$NetBSD: msdosfs_conv.c,v 1.6 1994/06/29 06:35:35 cgd Exp $	*/
  
  /*
--- 1,3 ----
! /*	$NetBSD: msdosfs_conv.c,v 1.7 1994/08/30 01:31:11 mycroft Exp $	*/
  
  /*
***************
*** 328,341 ****
  	 * string.
  	 */
! 	while (unlen && (c = *un) && c != '.') {
  		un++;
  		unlen--;
  	}
- 
- 	/*
- 	 * If we stopped on a '.', then get past it.
- 	 */
- 	if (c == '.')
- 		un++;
  
  	/*
--- 328,338 ----
  	 * string.
  	 */
! 	while (unlen && (c = *un)) {
  		un++;
  		unlen--;
+ 		/* Make sure we've skipped over the dot before stopping. */
+ 		if (c == '.')
+ 			break;
  	}
  
  	/*

------------------------------------------------------------------------------