BSBacktraceLogger
BSBacktraceLogger copied to clipboard
unsigned integer overflow
https://github.com/bestswifter/BSBacktraceLogger/blob/master/BSBacktraceLogger/BSBacktraceLogger.m#L318
untime error: unsigned integer overflow: 20274 - 21786 cannot be represented in type 'unsigned long'
for(uint32_t iSym = 0; iSym < symtabCmd->nsyms; iSym++) { // If n_value is 0, the symbol refers to an external object. if(symbolTable[iSym].n_value != 0) { uintptr_t symbolBase = symbolTable[iSym].n_value; uintptr_t currentDistance = addressWithSlide - symbolBase; if((addressWithSlide >= symbolBase) && (currentDistance <= bestDistance)) { bestMatch = symbolTable + iSym; bestDistance = currentDistance; } } }
https://github.com/plausiblelabs/plcrashreporter/commit/8e143316c26fe73bc9248c4c3d955e743cdbce59