ref: 8c1550954b8fd424b89a2d5ca77c5b77228deed4
parent: dba62070bf64f6f1ec2729563df183898e0eef19
author: Ethan Hugg <ehugg@cisco.com>
date: Sat Jan 4 17:42:57 EST 2014
Add release builds to Travis and fix warning in release build.
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,5 +9,5 @@
- sudo apt-get update -qq
- sudo apt-get install -qq g++-4.6-multilib gcc-multilib libc6-dev-i386 lib32z1-dev
install: make gtest-bootstrap
-script: make && make test && make clean && make ENABLE64BIT=Yes && make test
+script: make && make test && make clean && make ENABLE64BIT=Yes && make test && make clean && make BUILDTYPE=Release && make test && make BUILDTYPE=Release clean && make ENABLE64BIT=Yes BUILDTYPE=Release && make test
--- a/codec/console/dec/src/h264dec.cpp
+++ b/codec/console/dec/src/h264dec.cpp
@@ -141,7 +141,11 @@
goto label_exit;
}
- fread (pBuf, 1, iFileSize, pH264File);
+ if (fread (pBuf, 1, iFileSize, pH264File) != iFileSize) {
+ fprintf (stderr, "Unable to read whole file\n");
+ goto label_exit;
+ }
+
memcpy (pBuf + iFileSize, &uiStartCode[0], 4); //confirmed_safe_unsafe_usage
if (pDecoder->SetOption (DECODER_OPTION_DATAFORMAT, &iColorFormat)) {