pkgsrc/archivers/hpack/patches/patch-ac

33 lines
1 KiB
Text

$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 */