summaryrefslogtreecommitdiff
path: root/archivers/hpack/patches/patch-ac
blob: 6ebcfc7ead04a32568da4f90be02f6205443dbfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$NetBSD: patch-ac,v 1.2 2001/09/14 15:03:11 wiz Exp $

--- keycvt/keycvt.c.orig	Fri Aug 13 22:06:28 1993
+++ keycvt/keycvt.c
@@ -586,7 +586,7 @@
 	puts( "Warning: Password will be echoed to screen!" );
 	printf( "Password: " );
 	fflush( stdout );
-	gets( password );
+	fgets( password, sizeof(password), stdin );
 	}
 
 void initCrypt( void )
@@ -1034,13 +1034,17 @@
 		tempFileName[ pathLen++ ] = '/';
 	strcat( tempFileName, "randseed.bin" );
 #else
-	if( pathLen && ( ch = tempFileName[ pathLen - 1 ] ) != '\\' && ch != '/' )
+	if( pathLen && ( ch = tempFileName[ pathLen - 1 ] ) != '\\' && ch != '/' ) {
 		/* Add directory seperator if necessary */
 		tempFileName[ pathLen++ ] = '/';
+		tempFileName[ pathLen ] = '\0';
+	}
 	strcat( tempFileName, "randseed.bin" );
 #endif /* __ARC__ */
-	if( ( inFilePtr = fopen( tempFileName, "rb" ) ) == NULL )
+	if( ( inFilePtr = fopen( tempFileName, "rb" ) ) == NULL ) {
+		perror( tempFileName );
 		puts( "Cannot find PGP seed file, HPACK seed file not created" );
+	}
 	else
 		{
 		/* See if the output file exists */