File pgp4pine-1.76.dif of Package pgp4pine
--- README.SuSE
+++ README.SuSE
@@ -0,0 +1,12 @@
+Mit diesem Paket kann PGP/GnuPG mit pine verwendet werden.
+Eine gute Installationsanleitung steht in der Manpage:
+
+man pgp4pine
+
+-----------------------------------------------------
+
+This can be used to use PGP/GnuPG together with pine
+
+An installation description can be found in the manpage:
+
+man pgp4pine
--- configure.in
+++ configure.in
@@ -6,7 +6,6 @@
AM_INIT_AUTOMAKE(pgp4pine,1.76)
dnl Checks for programs.
-CFLAGS="-O"
AC_ARG_WITH(docdir,
[ --with-docdir where the documentation should be installed ],
[ DOCDIR=$with_docdir ],
--- pgp4pine/docs/en/Makefile.in
+++ pgp4pine/docs/en/Makefile.in
@@ -162,14 +162,12 @@
install-data-local:
- $(mkinstalldirs) $(docdir)/pgp4pine/
- $(INSTALL_DATA) FAQ $(docdir)/pgp4pine/FAQ
- $(mkinstalldirs) $(docdir)/pgp4pine/
- $(INSTALL_DATA) PGP_MIME $(docdir)/pgp4pine/PGP_MIME
- $(mkinstalldirs) $(mandir)/man1/
- $(INSTALL_DATA) pgp4pine.1 $(mandir)/man1/pgp4pine.1
- $(mkinstalldirs) $(docdir)/pgp4pine/
- $(INSTALL_DATA) pgp4pinerc.example $(docdir)/pgp4pine/pgp4pinerc.example
+ $(mkinstalldirs) $(DESTDIR)$(docdir)/pgp4pine/
+ $(INSTALL_DATA) FAQ $(DESTDIR)$(docdir)/pgp4pine/FAQ
+ $(INSTALL_DATA) PGP_MIME $(DESTDIR)$(docdir)/pgp4pine/PGP_MIME
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1/
+ $(INSTALL_DATA) pgp4pine.1 $(DESTDIR)$(mandir)/man1/pgp4pine.1
+ $(INSTALL_DATA) pgp4pinerc.example $(DESTDIR)$(docdir)/pgp4pine/pgp4pinerc.example
uninstall-local:
-rm -f $(docdir)/pgp4pine/FAQ
--- pgp4pine/keyrings.c
+++ pgp4pine/keyrings.c
@@ -187,7 +187,7 @@
}
}
- strncpy(tmpString,strtok('\0',"\n"),EMAIL_ADDRESS_MAX_LENGTH);
+ strncpy(tmpString,strtok('\0',"\n"),sizeof(tmpString));
UnescapeString(tmpString); /* remove escaped Chars */
/* Has a leading space, so copy from tmpString+1 */
strncpy(myNewKey->displayName,extractDisplayName(tmpString+1),EMAIL_ADDRESS_MAX_LENGTH);
@@ -281,7 +281,7 @@
/* next, key type... */
strcpy(myNewKey->keyType,"RSA"); /* STRCPY SAFE */
- strncpy(tmpString,strtok('\0',"\n"),EMAIL_ADDRESS_MAX_LENGTH);
+ strncpy(tmpString,strtok('\0',"\n"),sizeof(tmpString));
strncpy(myNewKey->displayName,extractDisplayName(tmpString),EMAIL_ADDRESS_MAX_LENGTH);
strncpy(myNewKey->emailAddress,extractEmailAddress(tmpString),EMAIL_ADDRESS_MAX_LENGTH);
break;
@@ -506,7 +506,7 @@
sprintf(myNewKey->keyID,"0%s",tmpString); /* SPRINTF SAFE */
/* finally, user name */
- strncpy(tmpString,getItem(buf,':',10),EMAIL_ADDRESS_MAX_LENGTH);
+ strncpy(tmpString,getItem(buf,':',10),sizeof(tmpString));
UnescapeString(tmpString); /* The ':' is quoted with '\x3a', so unescape */
strncpy(myNewKey->displayName,extractDisplayName(tmpString),EMAIL_ADDRESS_MAX_LENGTH);
strncpy(myNewKey->emailAddress,extractEmailAddress(tmpString),EMAIL_ADDRESS_MAX_LENGTH);
@@ -532,7 +532,7 @@
}
/* finally, user name */
- strncpy(tmpString,getItem(buf,':',10),EMAIL_ADDRESS_MAX_LENGTH);
+ strncpy(tmpString,getItem(buf,':',10),sizeof(tmpString));
strncpy(myNewKey->displayName,extractDisplayName(tmpString),EMAIL_ADDRESS_MAX_LENGTH);
strncpy(myNewKey->emailAddress,extractEmailAddress(tmpString),EMAIL_ADDRESS_MAX_LENGTH);
}
--- pgp4pine/md5.c
+++ pgp4pine/md5.c
@@ -288,10 +288,10 @@
p = hd->buf;
#ifdef WORDS_BIGENDIAN
-#define X(a) do { *p++ = hd->##a ; *p++ = hd->##a >> 8; \
- *p++ = hd->##a >> 16; *p++ = hd->##a >> 24; } while(0)
+#define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \
+ *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0)
#else /* little endian */
- /*#define X(a) do { *(u_int32_t*)p = hd->##a ; p += 4; } while(0)*/
+ /*#define X(a) do { *(u_int32_t*)p = hd->a ; p += 4; } while(0)*/
/* Unixware's cpp doesn't like the above construct so we do it his way:
* (reported by Allan Clark) */
#define X(a) do { *(u_int32_t*)p = (*hd).a ; p += 4; } while(0)
--- pgp4pine/menus.c
+++ pgp4pine/menus.c
@@ -18,6 +18,7 @@
char readline[CONSOLE_IO_LINE_LENGTH];
int c; /* must be int, not char, to store EOF is char is 1 Byte. By Thorsten Wittmann. */
+ memset(readline, 0, sizeof(readline));
if ((fin=fopen(inFile,"r"))==NULL)
{
printf("Error opening Message !!\n");
@@ -26,22 +27,11 @@
else
do {
fertig=0;
- while (!fertig)
- {
- if ((c=getc(fin))==EOF)
- {
- outFile=inFile; /* this usually is not
- executed, EOF breaks directly */
- return;
- }
- else if ((readline[i++]=c) == '\n')
- {
- readline[i]='\0';
- fertig=1;
- }
- }
- fertig=0;
+ /* fixing of. -S. */
+ if(!fgets(readline, sizeof(readline), fin))
+ fertig=1;
+
if (strncmp("-----BEGIN PGP SIGNED",readline,20)==0)
{
/* got signed message */
--- pgp4pine/snprintf.c
+++ pgp4pine/snprintf.c
@@ -1,3 +1,5 @@
+#include "config.h"
+
#ifndef HAVE_SNPRINTF
/* A replacement snprintf() for architectures that lack this function.
Borrowed from lprng. */
@@ -120,6 +122,8 @@
#include <errno.h>
#include <sys/types.h>
#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
#define HAVE_STDARGS /* let's hope that works everywhere (mj) */
#define VA_LOCAL_DECL va_list ap;
#define VA_START(f) va_start(ap, f)