Skip to content

Commit

Permalink
fied bug: if hex ecid only contains digits, make sure to prefix "0x" …
Browse files Browse the repository at this point in the history
…to tell tsschecker that it's hex
  • Loading branch information
tihmstar committed Dec 18, 2016
1 parent a68bbc2 commit 14d1631
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tsschecker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -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 = "<group>"; };
87CEC4C81C576BD9006E75FC /* tss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = tss.c; sourceTree = "<group>"; };
87CEC4CA1C576BE0006E75FC /* tss.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = tss.h; sourceTree = "<group>"; };
Expand All @@ -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 */,
Expand All @@ -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 */,
Expand Down
6 changes: 6 additions & 0 deletions tsschecker/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down

0 comments on commit 14d1631

Please sign in to comment.