tags 773492 + patch thanks The attached cherry pick from upstream fixes this issue and, combined with the patch in #771114, allows edk2 to build from source in unstable again.
Description: Fix undefined behavior in VfrCompiler. Origin: http://sourceforge.net/p/edk2-buildtools/code/2667/ Bug-Debian: http://bugs.debian.org/773492 Author: Reza Jelveh <reza.jel...@tuhh.de> Reviewed-by: Eric Dong <eric.d...@intel.com> Last-Update: 2014-12-18 Applied-Upstream: commit:r2667 Index: edk2-0~20131112.2590861a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp =================================================================== --- edk2-0~20131112.2590861a.orig/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp +++ edk2-0~20131112.2590861a/BaseTools/Source/C/VfrCompile/VfrCompiler.cpp @@ -372,6 +372,8 @@ CVfrCompiler::CVfrCompiler ( mPreProcessCmd = (CHAR8 *) PREPROCESSOR_COMMAND; mPreProcessOpt = (CHAR8 *) PREPROCESSOR_OPTIONS; + SET_RUN_STATUS (STATUS_STARTED); + OptionInitialization(Argc, Argv); if ((IS_RUN_STATUS(STATUS_FAILED)) || (IS_RUN_STATUS(STATUS_DEAD))) { Index: edk2-0~20131112.2590861a/BaseTools/Source/C/VfrCompile/VfrCompiler.h =================================================================== --- edk2-0~20131112.2590861a.orig/BaseTools/Source/C/VfrCompile/VfrCompiler.h +++ edk2-0~20131112.2590861a/BaseTools/Source/C/VfrCompile/VfrCompiler.h @@ -61,7 +61,8 @@ typedef struct { } OPTIONS; typedef enum { - STATUS_INITIALIZED = 1, + STATUS_STARTED = 0, + STATUS_INITIALIZED, STATUS_PREPROCESSED, STATUS_COMPILEED, STATUS_GENBINARY,