Skip to content

Commit

Permalink
BaseTools: Update SkuId checker to make sure it be valid UINT64 value
Browse files Browse the repository at this point in the history
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Cc: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
  • Loading branch information
lgao4 committed Dec 27, 2017
1 parent 4a75acb commit e4ff28c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions BaseTools/Source/Python/Common/Misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2149,10 +2149,10 @@ def __init__(self,SkuIdentifier='', SkuIds=None):
for SkuName in SkuIds:
SkuId = SkuIds[SkuName][0]
skuid_num = int(SkuId,16) if SkuId.upper().startswith("0X") else int(SkuId)
if skuid_num > 0xFFFF:
if skuid_num > 0xFFFFFFFFFFFFFFFF:
EdkLogger.error("build", PARAMETER_INVALID,
ExtraData = "SKU-ID [%s] must less than 65535"
% (SkuName))
ExtraData = "SKU-ID [%s] value %s exceeds the max value of UINT64"
% (SkuName, SkuId))

self.AvailableSkuIds = sdict()
self.SkuIdSet = []
Expand Down

0 comments on commit e4ff28c

Please sign in to comment.