- fix another static buffer overflow in fgets
- use update-patches
This commit is contained in:
parent
6bb79aa158
commit
a2f7849d99
@ -1,5 +1,6 @@
|
|||||||
--- Makefile.orig Wed Jan 5 02:47:50 1994
|
$OpenBSD: patch-Makefile,v 1.1 2003/04/14 09:46:06 avsm Exp $
|
||||||
+++ Makefile Sat Apr 8 17:03:47 2000
|
--- Makefile.orig Wed Jan 5 01:47:50 1994
|
||||||
|
+++ Makefile Mon Apr 14 10:41:07 2003
|
||||||
@@ -1,10 +1,18 @@
|
@@ -1,10 +1,18 @@
|
||||||
-ALL : musicin musicout
|
-ALL : musicin musicout
|
||||||
+CFLAGS += -DPREFIX=\"${PREFIX}\"
|
+CFLAGS += -DPREFIX=\"${PREFIX}\"
|
@ -1,5 +1,6 @@
|
|||||||
--- common.h.orig Wed Jan 5 02:42:00 1994
|
$OpenBSD: patch-common_h,v 1.1 2003/04/14 09:46:06 avsm Exp $
|
||||||
+++ common.h Mon Oct 8 00:08:30 2001
|
--- common.h.orig Wed Jan 5 01:42:00 1994
|
||||||
|
+++ common.h Mon Apr 14 10:41:07 2003
|
||||||
@@ -73,7 +73,7 @@ common.h
|
@@ -73,7 +73,7 @@ common.h
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -1,6 +1,7 @@
|
|||||||
--- musicin.c.orig Tue Jan 4 20:13:44 1994
|
$OpenBSD: patch-musicin_c,v 1.1 2003/04/14 09:46:06 avsm Exp $
|
||||||
+++ musicin.c Mon Nov 29 08:57:10 1999
|
--- musicin.c.orig Wed Jan 5 01:13:44 1994
|
||||||
@@ -101,6 +101,8 @@
|
+++ musicin.c Mon Apr 14 10:41:07 2003
|
||||||
|
@@ -101,6 +101,8 @@ musicin.c
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "encoder.h"
|
#include "encoder.h"
|
||||||
|
|
||||||
@ -9,7 +10,7 @@
|
|||||||
/* Global variable definitions for "musicin.c" */
|
/* Global variable definitions for "musicin.c" */
|
||||||
|
|
||||||
FILE *musicin;
|
FILE *musicin;
|
||||||
@@ -144,7 +146,7 @@
|
@@ -144,7 +146,7 @@ char encoded_file_name[MAX_NA
|
||||||
|
|
||||||
do {
|
do {
|
||||||
printf("Enter PCM input file name <required>: ");
|
printf("Enter PCM input file name <required>: ");
|
||||||
@ -18,7 +19,7 @@
|
|||||||
if (original_file_name[0] == NULL_CHAR)
|
if (original_file_name[0] == NULL_CHAR)
|
||||||
printf("PCM input file name is required.\n");
|
printf("PCM input file name is required.\n");
|
||||||
} while (original_file_name[0] == NULL_CHAR);
|
} while (original_file_name[0] == NULL_CHAR);
|
||||||
@@ -163,7 +165,7 @@
|
@@ -163,7 +165,7 @@ char encoded_file_name[MAX_NA
|
||||||
original_file_name, DFLT_EXT);
|
original_file_name, DFLT_EXT);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -27,7 +28,7 @@
|
|||||||
if (encoded_file_name[0] == NULL_CHAR) {
|
if (encoded_file_name[0] == NULL_CHAR) {
|
||||||
#ifdef MS_DOS
|
#ifdef MS_DOS
|
||||||
/* replace old extension with new one, 92-08-19 shn */
|
/* replace old extension with new one, 92-08-19 shn */
|
||||||
@@ -207,7 +209,7 @@
|
@@ -207,7 +209,7 @@ char encoded_file_name[MAX_NA
|
||||||
else { /* Not using Audio IFF sound file headers. */
|
else { /* Not using Audio IFF sound file headers. */
|
||||||
|
|
||||||
printf("What is the sampling frequency? <44100>[Hz]: ");
|
printf("What is the sampling frequency? <44100>[Hz]: ");
|
||||||
@ -36,7 +37,7 @@
|
|||||||
freq = atol(t);
|
freq = atol(t);
|
||||||
switch (freq) {
|
switch (freq) {
|
||||||
case 48000 : info->sampling_frequency = 1;
|
case 48000 : info->sampling_frequency = 1;
|
||||||
@@ -236,7 +238,7 @@
|
@@ -236,7 +238,7 @@ char encoded_file_name[MAX_NA
|
||||||
|
|
||||||
printf("Which layer do you want to use?\n");
|
printf("Which layer do you want to use?\n");
|
||||||
printf("Available: Layer (1), Layer (<2>): ");
|
printf("Available: Layer (1), Layer (<2>): ");
|
||||||
@ -45,7 +46,7 @@
|
|||||||
switch(*t){
|
switch(*t){
|
||||||
case '1': info->lay = 1; printf(">>> Using Layer %s\n",t); break;
|
case '1': info->lay = 1; printf(">>> Using Layer %s\n",t); break;
|
||||||
case '2': info->lay = 2; printf(">>> Using Layer %s\n",t); break;
|
case '2': info->lay = 2; printf(">>> Using Layer %s\n",t); break;
|
||||||
@@ -246,7 +248,7 @@
|
@@ -246,7 +248,7 @@ char encoded_file_name[MAX_NA
|
||||||
printf("Which mode do you want?\n");
|
printf("Which mode do you want?\n");
|
||||||
printf("Available: (<s>)tereo, (j)oint stereo, ");
|
printf("Available: (<s>)tereo, (j)oint stereo, ");
|
||||||
printf("(d)ual channel, s(i)ngle Channel: ");
|
printf("(d)ual channel, s(i)ngle Channel: ");
|
||||||
@ -54,7 +55,7 @@
|
|||||||
switch(*t){
|
switch(*t){
|
||||||
case 's':
|
case 's':
|
||||||
case 'S':
|
case 'S':
|
||||||
@@ -275,7 +277,7 @@
|
@@ -275,7 +277,7 @@ char encoded_file_name[MAX_NA
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Which psychoacoustic model do you want to use? <2>: ");
|
printf("Which psychoacoustic model do you want to use? <2>: ");
|
||||||
@ -63,7 +64,7 @@
|
|||||||
model = atoi(t);
|
model = atoi(t);
|
||||||
if (model > 2 || model < 1) {
|
if (model > 2 || model < 1) {
|
||||||
printf(">>> Default model 2 selected\n");
|
printf(">>> Default model 2 selected\n");
|
||||||
@@ -287,7 +289,7 @@
|
@@ -287,7 +289,7 @@ char encoded_file_name[MAX_NA
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("What is the total bitrate? <%u>[kbps]: ", DFLT_BRT);
|
printf("What is the total bitrate? <%u>[kbps]: ", DFLT_BRT);
|
||||||
@ -72,7 +73,7 @@
|
|||||||
brt = atoi(t);
|
brt = atoi(t);
|
||||||
if (brt == 0) brt = -10;
|
if (brt == 0) brt = -10;
|
||||||
j=0;
|
j=0;
|
||||||
@@ -310,7 +312,7 @@
|
@@ -310,7 +312,7 @@ char encoded_file_name[MAX_NA
|
||||||
|
|
||||||
printf("What type of de-emphasis should the decoder use?\n");
|
printf("What type of de-emphasis should the decoder use?\n");
|
||||||
printf("Available: (<n>)one, (5)0/15 microseconds, (c)citt j.17: ");
|
printf("Available: (<n>)one, (5)0/15 microseconds, (c)citt j.17: ");
|
||||||
@ -81,7 +82,7 @@
|
|||||||
if (*t != 'n' && *t != '5' && *t != 'c') {
|
if (*t != 'n' && *t != '5' && *t != 'c') {
|
||||||
printf(">>> Using default no de-emphasis\n");
|
printf(">>> Using default no de-emphasis\n");
|
||||||
info->emphasis = 0;
|
info->emphasis = 0;
|
||||||
@@ -325,7 +327,7 @@
|
@@ -325,7 +327,7 @@ char encoded_file_name[MAX_NA
|
||||||
/* Start 2. Part changes for CD Ver 3.2; jsp; 22-Aug-1991 */
|
/* Start 2. Part changes for CD Ver 3.2; jsp; 22-Aug-1991 */
|
||||||
|
|
||||||
printf("Do you want to set the private bit? (y/<n>): ");
|
printf("Do you want to set the private bit? (y/<n>): ");
|
||||||
@ -90,7 +91,7 @@
|
|||||||
if (*t == 'y' || *t == 'Y') info->extension = 1;
|
if (*t == 'y' || *t == 'Y') info->extension = 1;
|
||||||
else info->extension = 0;
|
else info->extension = 0;
|
||||||
if(info->extension) printf(">>> Private bit set\n");
|
if(info->extension) printf(">>> Private bit set\n");
|
||||||
@@ -334,28 +336,28 @@
|
@@ -334,28 +336,28 @@ char encoded_file_name[MAX_NA
|
||||||
/* End changes for CD Ver 3.2; jsp; 22-Aug-1991 */
|
/* End changes for CD Ver 3.2; jsp; 22-Aug-1991 */
|
||||||
|
|
||||||
printf("Do you want error protection? (y/<n>): ");
|
printf("Do you want error protection? (y/<n>): ");
|
@ -1,6 +1,7 @@
|
|||||||
--- musicout.c.orig Tue Jan 4 23:39:27 1994
|
$OpenBSD: patch-musicout_c,v 1.1 2003/04/14 09:46:06 avsm Exp $
|
||||||
+++ musicout.c Mon Nov 29 08:57:11 1999
|
--- musicout.c.orig Wed Jan 5 04:39:27 1994
|
||||||
@@ -58,6 +58,8 @@
|
+++ musicout.c Mon Apr 14 10:41:07 2003
|
||||||
|
@@ -58,6 +58,8 @@ musicout.c
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "decoder.h"
|
#include "decoder.h"
|
||||||
|
|
||||||
@ -9,7 +10,7 @@
|
|||||||
/********************************************************************
|
/********************************************************************
|
||||||
/*
|
/*
|
||||||
/* This part contains the MPEG I decoder for Layers I & II.
|
/* This part contains the MPEG I decoder for Layers I & II.
|
||||||
@@ -139,7 +141,7 @@
|
@@ -139,7 +141,7 @@ typedef double VE[2][HAN_SIZE];
|
||||||
if(argc==1) { /* no command line args -> interact */
|
if(argc==1) { /* no command line args -> interact */
|
||||||
do {
|
do {
|
||||||
printf ("Enter encoded file name <required>: ");
|
printf ("Enter encoded file name <required>: ");
|
||||||
@ -18,7 +19,7 @@
|
|||||||
if (encoded_file_name[0] == NULL_CHAR)
|
if (encoded_file_name[0] == NULL_CHAR)
|
||||||
printf ("Encoded file name is required. \n");
|
printf ("Encoded file name is required. \n");
|
||||||
} while (encoded_file_name[0] == NULL_CHAR);
|
} while (encoded_file_name[0] == NULL_CHAR);
|
||||||
@@ -151,7 +153,7 @@
|
@@ -151,7 +153,7 @@ typedef double VE[2][HAN_SIZE];
|
||||||
printf ("Enter MPEG decoded file name <%s%s>: ", encoded_file_name,
|
printf ("Enter MPEG decoded file name <%s%s>: ", encoded_file_name,
|
||||||
DFLT_OPEXT);
|
DFLT_OPEXT);
|
||||||
#endif
|
#endif
|
||||||
@ -27,7 +28,7 @@
|
|||||||
if (decoded_file_name[0] == NULL_CHAR) {
|
if (decoded_file_name[0] == NULL_CHAR) {
|
||||||
#ifdef MS_DOS
|
#ifdef MS_DOS
|
||||||
/* replace old extension with new one, 92-08-19 shn */
|
/* replace old extension with new one, 92-08-19 shn */
|
||||||
@@ -164,7 +166,7 @@
|
@@ -164,7 +166,7 @@ typedef double VE[2][HAN_SIZE];
|
||||||
|
|
||||||
printf(
|
printf(
|
||||||
"Do you wish to write an AIFF compatible sound file ? (y/<n>) : ");
|
"Do you wish to write an AIFF compatible sound file ? (y/<n>) : ");
|
||||||
@ -36,7 +37,7 @@
|
|||||||
if (*t == 'y' || *t == 'Y') need_aiff = TRUE;
|
if (*t == 'y' || *t == 'Y') need_aiff = TRUE;
|
||||||
else need_aiff = FALSE;
|
else need_aiff = FALSE;
|
||||||
if (need_aiff)
|
if (need_aiff)
|
||||||
@@ -173,7 +175,7 @@
|
@@ -173,7 +175,7 @@ typedef double VE[2][HAN_SIZE];
|
||||||
|
|
||||||
printf(
|
printf(
|
||||||
"Do you wish to exit (last chance before decoding) ? (y/<n>) : ");
|
"Do you wish to exit (last chance before decoding) ? (y/<n>) : ");
|
12
audio/mpegaudio/patches/patch-psy_c
Normal file
12
audio/mpegaudio/patches/patch-psy_c
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
$OpenBSD: patch-psy_c,v 1.1 2003/04/14 09:46:06 avsm Exp $
|
||||||
|
--- psy.c.orig Mon Apr 14 10:41:19 2003
|
||||||
|
+++ psy.c Mon Apr 14 10:41:48 2003
|
||||||
|
@@ -428,7 +428,7 @@ int table;
|
||||||
|
printf("Please check %s table\n", ta);
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
- fgets(t, 150, fp);
|
||||||
|
+ fgets(t, sizeof t, fp);
|
||||||
|
sscanf(t, "table %ld", &index);
|
||||||
|
if(index != table){
|
||||||
|
printf("error in absthr table %s",ta);
|
Loading…
Reference in New Issue
Block a user