diff options
| author | jhurst <jhurst@cinecert.com> | 2009-12-18 20:01:11 +0000 |
|---|---|---|
| committer | jhurst <> | 2009-12-18 20:01:11 +0000 |
| commit | c063fb19776c6f3f650698e47b27e219958d40fb (patch) | |
| tree | 9c1f539e606a10606020632e7cbf5f2f8dc9d44a | |
| parent | 55a8fee0207797c26bfa5b7dee18a65b77e80bd8 (diff) | |
fixed blind willingness to truncate large items
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | src/TimedText_Parser.cpp | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index b4f925c..92f37b4 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,7 @@ AC_PREREQ([2.59]) # For example, if asdcplib version 1.0.0 were modified to accomodate changes # in file format, and if no changes were made to AS_DCP.h, the new version would be # 1.0.1. If changes were also required in AS_DCP.h, the new version would be 1.1.1. -AC_INIT([asdcplib], [1.5.29], [asdcplib@cinecert.com]) +AC_INIT([asdcplib], [1.5.30], [asdcplib@cinecert.com]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_SRCDIR([src/KM_error.h]) diff --git a/src/TimedText_Parser.cpp b/src/TimedText_Parser.cpp index 9b7ce38..397fd51 100644 --- a/src/TimedText_Parser.cpp +++ b/src/TimedText_Parser.cpp @@ -78,8 +78,12 @@ public: if ( KM_SUCCESS(result) ) { - ui32_t read_count = 0; - result = Reader.Read(FrameBuf.Data(), FrameBuf.Capacity(), &read_count); + ui32_t read_count, read_size = Reader.Size(); + + result = FrameBuf.Capacity(read_size); + + if ( KM_SUCCESS(result) ) + result = Reader.Read(FrameBuf.Data(), read_size, &read_count); if ( KM_SUCCESS(result) ) FrameBuf.Size(read_count); |
