$OpenBSD: patch-frontend_main_c,v 1.6 2008/09/15 21:58:19 jakemsr Exp $ --- frontend/main.c.orig Thu Nov 1 05:33:29 2007 +++ frontend/main.c Sun Aug 31 01:55:23 2008 @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -399,7 +400,7 @@ int decodeAACfile(char *aacfile, char *sndfile, char * float *song_length) { int tagsize; - unsigned long samplerate; + unsigned int samplerate; unsigned char channels; void *sample_buffer; @@ -709,7 +710,7 @@ int decodeMP4file(char *mp4file, char *sndfile, char * int infoOnly, int adts_out, float *song_length) { int track; - unsigned long samplerate; + unsigned int samplerate; unsigned char channels; void *sample_buffer; @@ -1085,7 +1086,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; - if (sscanf(optarg, "%s", dr) < 1) { + if (sscanf(optarg, "%9s", dr) < 1) { def_srate = 0; } else { def_srate = atoi(dr); @@ -1096,7 +1097,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; - if (sscanf(optarg, "%s", dr) < 1) + if (sscanf(optarg, "%9s", dr) < 1) { format = 1; } else { @@ -1110,7 +1111,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; - if (sscanf(optarg, "%s", dr) < 1) + if (sscanf(optarg, "%9s", dr) < 1) { outputFormat = FAAD_FMT_16BIT; /* just use default */ } else { @@ -1124,7 +1125,7 @@ int main(int argc, char *argv[]) if (optarg) { char dr[10]; - if (sscanf(optarg, "%s", dr) < 1) + if (sscanf(optarg, "%9s", dr) < 1) { object_type = LC; /* default */ } else {