From 14d1631db9930028613fc767411a33f2456eb2bb Mon Sep 17 00:00:00 2001 From: tihmstar Date: Sun, 18 Dec 2016 09:56:07 +0100 Subject: [PATCH] fied bug: if hex ecid only contains digits, make sure to prefix "0x" to tell tsschecker that it's hex --- tsschecker.xcodeproj/project.pbxproj | 6 ++---- tsschecker/main.c | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/tsschecker.xcodeproj/project.pbxproj b/tsschecker.xcodeproj/project.pbxproj index 1a88676e..2561b074 100644 --- a/tsschecker.xcodeproj/project.pbxproj +++ b/tsschecker.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 8747AC531D83006100349BB9 /* libcrypto.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 8747AC521D83006100349BB9 /* libcrypto.tbd */; }; 87CEC4C91C576BD9006E75FC /* tss.c in Sources */ = {isa = PBXBuildFile; fileRef = 87CEC4C81C576BD9006E75FC /* tss.c */; }; 87EB90A31C2940CD002CEE70 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = 87EB90A21C2940CD002CEE70 /* main.c */; }; 87EB90AA1C2940EC002CEE70 /* libpartialzip-1.0.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 87EB90A91C2940EC002CEE70 /* libpartialzip-1.0.0.dylib */; }; @@ -31,7 +30,7 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 8747AC521D83006100349BB9 /* libcrypto.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcrypto.tbd; path = usr/lib/libcrypto.tbd; sourceTree = SDKROOT; }; + 8747AC521D83006100349BB9 /* libcrypto.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcrypto.dylib; path = usr/lib/libcrypto.dylib; sourceTree = SDKROOT; }; 87AD68BB1D8ACE7F0094A99F /* all_tsschecker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = all_tsschecker.h; sourceTree = ""; }; 87CEC4C81C576BD9006E75FC /* tss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tss.c; sourceTree = ""; }; 87CEC4CA1C576BE0006E75FC /* tss.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tss.h; sourceTree = ""; }; @@ -53,7 +52,6 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 8747AC531D83006100349BB9 /* libcrypto.tbd in Frameworks */, 87EB90AE1C294108002CEE70 /* libcurl.tbd in Frameworks */, 87EB90AC1C2940FB002CEE70 /* libplist.3.dylib in Frameworks */, 87EB90AA1C2940EC002CEE70 /* libpartialzip-1.0.0.dylib in Frameworks */, @@ -75,7 +73,7 @@ 87EB90961C2940CD002CEE70 = { isa = PBXGroup; children = ( - 8747AC521D83006100349BB9 /* libcrypto.tbd */, + 8747AC521D83006100349BB9 /* libcrypto.dylib */, 87EB90AD1C294108002CEE70 /* libcurl.tbd */, 87EB90AB1C2940FB002CEE70 /* libplist.3.dylib */, 87EB90A91C2940EC002CEE70 /* libpartialzip-1.0.0.dylib */, diff --git a/tsschecker/main.c b/tsschecker/main.c index c38ffee6..ae78e4a1 100644 --- a/tsschecker/main.c +++ b/tsschecker/main.c @@ -82,6 +82,12 @@ int64_t parseECID(const char *ecid){ int isHex = 0; int64_t ret = 0; + //in case hex ecid only contains digits, specify with 0x1235 + if (strncmp(ecid, "0x", 2) == 0){ + isHex = 1; + ecidBK = ecid+2; + } + while (*ecid && !isHex) { char c = *(ecid++); if (c >= '0' && c<='9') {