sprintf considered harmful...
authorjhurst <jhurst@cinecert.com>
Thu, 5 Oct 2006 21:38:23 +0000 (21:38 +0000)
committerjhurst <>
Thu, 5 Oct 2006 21:38:23 +0000 (21:38 +0000)
README
src/AS_DCP.h
src/MDD.cpp
src/wavesplit.cpp

diff --git a/README b/README
index 2da02907cd88052baa23168c4eb761e17fcf224b..173fb36600bae822a9dde934d0672f61fed00e84 100755 (executable)
--- a/README
+++ b/README
@@ -115,7 +115,7 @@ utilities all respond to -h and there are manual pages in man/.
 Change History
 2006.09.28 - Bug fixes v1.1.10
  o Changed RM_RELEASE to RL_RELEASE in MXFTypes.h.
- o Cahnged the MXF writer to use RL_RELEASE (was RL_DEVELOPMENT).
+ o Changed the MXF writer to use RL_RELEASE (was RL_DEVELOPMENT).
  o Really fixed source reference chain.
  o Updated JP2K file package label.
  o Changed location of JPEG2000PictureSubDescriptor in the
index 54f3becb2d89f2b5b74e9bc2e5dad4d05a7af43a..75056660096ebcb6416957d192b2e053edccca8a 100755 (executable)
@@ -78,8 +78,9 @@ This project depends upon the following library:
 #include <KM_error.h>
 #include <stdio.h>
 #include <stdarg.h>
-#include <iostream>
 #include <math.h>
+#include <iostream>
+#include <string>
 
 //--------------------------------------------------------------------------------
 // common integer types
index 32d2c691bdf07ca1eb8147c64ced21d85d211135..29be17760d841e0538a8a36d72a2a85caa083086 100644 (file)
@@ -795,7 +795,7 @@ static const ASDCP::MDDEntry s_MDD_Table[] = {
   { { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0x09, // 253
       0x02, 0x09, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00 },
       {0}, false, "CryptographicContext_CryptographicKeyID" },
-  { 0, 0, 0 }
+  { {0}, {0}, false, 0 }
 };
 
 const ui32_t s_MDD_Table_size = 254;
index 964e616fa4917ca93e8e4792b5c1bd5199952f5c..f7c94c269d0c48366de0d76ca0a3b824df490e52 100755 (executable)
@@ -253,12 +253,12 @@ split_wav_file(CommandOptions& Options)
   if ( ASDCP_SUCCESS(result) )
     {
       char filename[256];
-      sprintf(filename, "%s_l.wav", Options.file_root);
+      snprintf(filename, 256, "%s_l.wav", Options.file_root);
       result = L_OutFile.OpenWrite(filename);
 
       if ( ASDCP_SUCCESS(result) )
        {
-         sprintf(filename, "%s_r.wav", Options.file_root);
+         snprintf(filename, 256, "%s_r.wav", Options.file_root);
          result = R_OutFile.OpenWrite(filename);
        }
     }