631ffb70eb
BaseTools/VfrCompile: Add check to avoid using NULL pointer
...
Question value are stored in one specified storage, but the Data type
of the storage is not specified or there is no sub fields in the Data
type sometimes, so we need to add check before using related pointers.
Here list some NULL cases:
(1)For an efivastore which doesn't specify a data structure or a
data type(UINT8,UINT16...)as the storage, just has VarName and
VarSize instead, we can not get its data type before parsing
its VarSize.
(2)For efivastore which just specifies the data type(UINT8,UINT16...)
not a structure as the storage,this data type doesn't have sub-fields.
Cc: Eric Dong <eric.dong@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2017-11-03 12:39:45 +08:00
42c808d4cb
BaseTool/VfrCompiler: Support Bit fields in EFI/Buffer VarStore
...
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=545
Enhance VfrCompiler to parse following case:
1. EFI/Buffer VarStore can contain bit fields in their structure.
2. For question Oneof/Checkbox/numeric, their storage can be
bit fields of an EFI VarStore/Buffer VarStore.
Cc: Eric Dong <eric.dong@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Eric Dong <eric.dong@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2017-09-21 16:17:40 +08:00
2b7f3d4a6b
BaseTool/VfrCompile: Support Union type in VFR
...
https://bugzilla.tianocore.org/show_bug.cgi?id=603
Update VfrCompiler to parse the UNION type in vfr file
Cc: Eric Dong <eric.dong@intel.com >
Cc: Liming Gao <liming.gao@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Eric Dong <eric.dong@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2017-09-21 16:17:40 +08:00
d37fa01fbb
VfrCompile: fix invalid comparison between pointer and integer
...
This would be valid C but is not valid C++, so change the comparison to do what it has always been doing.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com >
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com >
2017-02-22 10:45:51 +08:00
0d46defefa
BaseTools/VfrCompile: Add assignment operator definition for some classes
...
For class that defines the copy constructor, it is better to add the
assignment operator definition as well.
This commit adds the definition for assignment operator for the classes
with the copy constructor defined.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Dandan Bi <dandan.bi@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2016-11-08 16:37:20 +08:00
fd5425230e
BaseTools/VfrCompile: Avoid freeing memory with mismatched functions
...
Memory allocated by operator new[] should be freed using delete[] to avoid
possible memory leak.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Dandan Bi <dandan.bi@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2016-11-08 16:37:17 +08:00
bab5ad2fd1
BaseTools/VfrCompile: Add checks for array access
...
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Dandan Bi <dandan.bi@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2016-11-08 16:37:07 +08:00
61eb9834a3
BaseTools/VfrCompile: Initialize local variables before being used
...
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Dandan Bi <dandan.bi@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2016-11-08 16:36:43 +08:00
9b78c54a09
BaseTools/VfrCompile: Avoid possible NULL pointer dereference
...
Cc: Liming Gao <liming.gao@intel.com >
Cc: Yonghong Zhu <yonghong.zhu@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Cc: Dandan Bi <dandan.bi@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
2016-11-08 16:36:35 +08:00
74bbe31b8d
BaseTools/VfrCompile: Add two new option for VfrCompile
...
1.--autodefault option
VfrCompile will generate default opcodes for questions if some
default are missing.
2 --checkdefault option
VfrCompile will check whether every question has no default or
has all default. If not, will generate an error to let user know
the question misses default.
Cc: Liming Gao <liming.gao@intel.com >
Cc: Eric Dong <eric.dong@intel.com >
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Dandan Bi <dandan.bi@intel.com >
Reviewed-by: Eric Dong <eric.dong@intel.com >
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com >
2016-08-08 11:07:24 +08:00
ddaf640f50
BaseTools: Enable buffer type value for default and oneofoption opcode.
...
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com >
Reviewed-by: Liming Gao <liming.gao@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17335 6f19259b-4bc3-4df7-8a09-765794883524
2015-05-06 09:35:14 +00:00
1be2ed90a2
There is a limitation on WINDOWS OS for the length of entire file path can’t be larger than 255. There is an OS API provided by Microsoft to add “\\?\” before the path header to support the long file path. Enable this feature on basetools.
...
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hess Chen <hesheng.chen@intel.com >
Reviewed-by: Yingke Liu <yingke.d.liu@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15809 6f19259b-4bc3-4df7-8a09-765794883524
2014-08-15 03:06:48 +00:00
e8a47801a1
Sync BaseTool trunk (version r2610) into EDKII BaseTools.
...
Signed-off-by: Liming Gao <liming.gao@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14856 6f19259b-4bc3-4df7-8a09-765794883524
2013-11-18 07:41:21 +00:00
4afd3d0422
Sync BaseTool trunk (version r2599) into EDKII BaseTools.
...
Signed-off-by: Liming Gao <liming.gao@intel.com >
Reviewed-by: Heshen Chen <chen.heshen@intel.com >
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14591 6f19259b-4bc3-4df7-8a09-765794883524
2013-08-23 02:18:16 +00:00
64b2609fcf
Sync BaseTools Trunk (version r2518) to EDKII main trunk.
...
Signed-off-by: Liming Gao <liming.gao@intel.com >
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13178 6f19259b-4bc3-4df7-8a09-765794883524
2012-04-10 07:18:20 +00:00
4234283c3a
Sync BaseTools Branch (version r2271) to EDKII main trunk.
...
BaseTool Branch:
https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100
Signed-off-by: lgao4
Reviewed-by: hchen30
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12214 6f19259b-4bc3-4df7-8a09-765794883524
2011-08-26 07:46:26 +00:00
da92f27632
Sync BaseTools Branch (version r2149) to EDKII main trunk.
...
BaseTool Branch:
https://edk2-buildtools.svn.sourceforge.net/svnroot/edk2-buildtools/branches/Releases/BaseTools_r2100
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11640 6f19259b-4bc3-4df7-8a09-765794883524
2011-05-11 10:26:49 +00:00
40d841f6a8
Sync EDKII BaseTools to BaseTools project r1971
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10502 6f19259b-4bc3-4df7-8a09-765794883524
2010-05-18 05:04:32 +00:00
52302d4dee
Sync EDKII BaseTools to BaseTools project r1903.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10123 6f19259b-4bc3-4df7-8a09-765794883524
2010-02-28 23:39:39 +00:00
fd171542e0
Sync basetools' source and binary files with r1707 of the basetools project.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9257 6f19259b-4bc3-4df7-8a09-765794883524
2009-09-11 03:14:43 +00:00
df1780f8bf
Fix VfrCompiler bug to create varstore name by varstore name field not structure field for framework Vfr.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8968 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-17 11:11:56 +00:00
30fdf1140b
Check In tool source code based on Build tool project revision r1655.
...
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8964 6f19259b-4bc3-4df7-8a09-765794883524
2009-07-17 09:10:31 +00:00