Module Name: src
Committed By: christos
Date: Tue Aug 23 19:57:24 UTC 2011
Modified Files:
src/usr.sbin/makefs: cd9660.c
Log Message:
more fixes from martin
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/usr.sbin/makefs/cd9660.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/makefs/cd9660.c
diff -u src/usr.sbin/makefs/cd9660.c:1.33 src/usr.sbin/makefs/cd9660.c:1.34
--- src/usr.sbin/makefs/cd9660.c:1.33 Tue Aug 23 15:17:07 2011
+++ src/usr.sbin/makefs/cd9660.c Tue Aug 23 15:57:24 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660.c,v 1.33 2011/08/23 19:17:07 christos Exp $ */
+/* $NetBSD: cd9660.c,v 1.34 2011/08/23 19:57:24 christos Exp $ */
/*
* Copyright (c) 2005 Daniel Watt, Walter Deignan, Ryan Gabrys, Alan
@@ -103,7 +103,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(__lint)
-__RCSID("$NetBSD: cd9660.c,v 1.33 2011/08/23 19:17:07 christos Exp $");
+__RCSID("$NetBSD: cd9660.c,v 1.34 2011/08/23 19:57:24 christos Exp $");
#endif /* !__lint */
#include <string.h>
@@ -1635,9 +1635,9 @@
int extlen = 0;
int found_ext = 0;
- while (*oldname != '\0') {
+ while (*oldname != '\0' && extlen < 3) {
/* Handle period first, as it is special */
- if (*oldname == '.' && extlen < 3) {
+ if (*oldname == '.') {
if (found_ext) {
*newname++ = '_';
extlen ++;