freebsd-ports/cad/alliance/files/patch-06-fix-format-strings
John Marino a3951781e6 cad/alliance: Upgrade version 5.0.20090901 => 5.0.20120515, stage
This port was marked broken due to a bison error.  The newest version had
the same flaw, but I got the fix from Debian.  The 5.0.20120512 is also
not limited to i386, it builds fine on amd64 now.

It is still not jobs safe (it can't find libVrd before it's built) but
I suspect only minor changes are necessary to make it jobs safe.
2014-08-30 16:41:04 +00:00

95 lines
3.1 KiB
Text

Description: Format string fixes
This patch fixes some format string problems with fprintf().
Author: Roland Stigge <stigge@antcom.de>
===================================================================
--- alliance-5.0-20110203.orig/rtd/src/rtd_drive.c 2002-09-30 18:21:10.000000000 +0200
+++ rtd/src/rtd_drive.c 2012-03-24 15:24:00.000000000 +0100
@@ -100,7 +100,7 @@
RtlExprLength = Length;
}
- fprintf( RtlFile, Name );
+ fprintf( RtlFile, "%s", Name );
}
/*------------------------------------------------------------\
===================================================================
--- alliance-5.0-20110203.orig/vpd/src/vpd_drive.c 2002-09-30 18:21:32.000000000 +0200
+++ vpd/src/vpd_drive.c 2012-03-24 15:37:53.000000000 +0100
@@ -100,7 +100,7 @@
VpnExprLength = Length;
}
- fprintf( VpnFile, Name );
+ fprintf( VpnFile, "%s", Name );
}
/*------------------------------------------------------------\
===================================================================
--- alliance-5.0-20110203.orig/boog/src/bog_normalize_message.c 2002-09-30 18:19:58.000000000 +0200
+++ boog/src/bog_normalize_message.c 2012-03-24 15:50:03.000000000 +0100
@@ -106,7 +106,7 @@
}
fprintf(stderr,"BEH: ");
- fprintf(stderr,message);
+ fprintf(stderr,"%s",message);
fprintf(stderr," in '");
fflush(stderr);
display_abl(abl);
===================================================================
--- alliance-5.0-20110203.orig/l2p/src/drive_ps.c 2005-02-17 16:34:44.000000000 +0100
+++ l2p/src/drive_ps.c 2012-03-24 16:02:33.000000000 +0100
@@ -83,22 +83,22 @@
break;
case E_OPEN :
fprintf (stderr, "Problem while opening file ");
- fprintf (stderr, msg);
+ fprintf (stderr, "%s", msg);
break;
case E_CLOSE :
fprintf (stderr, "Problem while closing file ");
- fprintf (stderr, msg);
+ fprintf (stderr, "%s", msg);
break;
case E_WRITE :
fprintf (stderr, "Problem while writing file ");
- fprintf (stderr, msg);
+ fprintf (stderr, "%s", msg);
break;
case E_READ :
fprintf (stderr, "Problem while reading file ");
- fprintf (stderr, msg);
+ fprintf (stderr, "%s", msg);
break;
case E_OUTBOX :
- fprintf (stderr, msg);
+ fprintf (stderr, "%s", msg);
break;
default :
fprintf (stderr, "Unknow internal error");
===================================================================
--- alliance-5.0-20110203.orig/loon/src/lon_normalize_message.c 2004-09-06 23:26:09.000000000 +0200
+++ loon/src/lon_normalize_message.c 2012-03-24 16:15:39.000000000 +0100
@@ -106,7 +106,7 @@
}
fprintf(stderr,"BEH: ");
- fprintf(stderr,message);
+ fprintf(stderr,"%s",message);
fprintf(stderr," in '");
fflush(stderr);
display_abl(abl);
===================================================================
--- alliance-5.0-20110203.orig/sea/src/util_LEFDEF.c 2004-09-29 23:40:46.000000000 +0200
+++ sea/src/util_LEFDEF.c 2012-03-24 16:36:27.000000000 +0100
@@ -213,7 +213,7 @@
*pI = (char)0; pI += 1;
sprintf (asLEF, "%s(%s)", sTmp, pI);
} else {
- sprintf (asLEF, sTmp);
+ sprintf (asLEF, "%s", sTmp);
}
return (asLEF);