aboutsummaryrefslogtreecommitdiff
path: root/security/pad
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-10-27 02:30:46 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-10-27 02:30:46 +0000
commit6dc79b892f9e3e36341b92df498c161924ce8422 (patch)
treea76eae7f7510842e4772433f30d6ea96adfe867b /security/pad
parenta71bf74815aeee80f9aab3ac4a9d946de48c8e95 (diff)
downloadports-6dc79b892f9e3e36341b92df498c161924ce8422.tar.gz
ports-6dc79b892f9e3e36341b92df498c161924ce8422.zip
Notes
Diffstat (limited to 'security/pad')
-rw-r--r--security/pad/Makefile1
-rw-r--r--security/pad/files/patch-pad.c23
2 files changed, 19 insertions, 5 deletions
diff --git a/security/pad/Makefile b/security/pad/Makefile
index 9328506045ec..92f224707035 100644
--- a/security/pad/Makefile
+++ b/security/pad/Makefile
@@ -8,6 +8,7 @@
PORTNAME= pad
PORTEPOCH= 1
PORTVERSION= 1.0.4
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://www.lammah.com/pad/
EXTRACT_SUFX= .tgz
diff --git a/security/pad/files/patch-pad.c b/security/pad/files/patch-pad.c
index 411805ef04f3..407249a4e6d6 100644
--- a/security/pad/files/patch-pad.c
+++ b/security/pad/files/patch-pad.c
@@ -1,5 +1,5 @@
--- pad.c.orig Sun Jul 23 09:14:10 2000
-+++ pad.c Sun Feb 10 11:15:12 2002
++++ pad.c Sun Oct 6 15:17:31 2002
@@ -31,17 +31,17 @@
#include "pad.h"
#include "md5.h"
@@ -134,15 +134,17 @@
+ for (i=0; ofname[i][0] != (char)0; i++)
{
- if ((defined_output) && (lastout == i))
-+ if ((defined_output) && (lastout == i)) {
- sprintf(buf, outputname);
+- sprintf(buf, outputname);
- else
-+ } else {
- sprintf(buf, "pad-md5-%s.dat", hexize(digest[i]));
+- sprintf(buf, "pad-md5-%s.dat", hexize(digest[i]));
-
- if (rename(ofname[i], buf)) /* note: no renaming across filesystems */
- fprintf(stderr, "Error renaming: %s\n", strerror(errno));
- else
++ if ((defined_output) && (lastout == i)) {
++ snprintf(buf, sizeof(buf), outputname);
++ } else {
++ snprintf(buf, sizeof(buf), "pad-md5-%s.dat", hexize(digest[i]));
+ }
+ if (rename((char *)ofname[i], buf)) { /* note: no renaming across filesystems */
+ fprintf (stderr,
@@ -174,3 +176,14 @@
to its MD5-sum, along with the rest of the random pads.
-s [size] - The output data will be [size] bytes. If this is less than the
+@@ -325,8 +329,8 @@
+ buf[0] = '\0';
+ for ( j=0 ; j<16 ; j++ )
+ {
+- sprintf(buf, "%s%c", buf, (hexdigits[digest[j]>>4]));
+- sprintf(buf, "%s%c", buf, (hexdigits[digest[j]&0xf]));
++ snprintf(buf, sizeof(buf), "%s%c", buf, (hexdigits[digest[j]>>4]));
++ snprintf(buf, sizeof(buf), "%s%c", buf, (hexdigits[digest[j]&0xf]));
+ }
+ return((char *)strdup(buf));
+ }