BSBacktraceLogger icon indicating copy to clipboard operation
BSBacktraceLogger copied to clipboard

unsigned integer overflow

Open k373379320 opened this issue 5 years ago • 1 comments

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; } } }

k373379320 avatar Apr 30 '19 09:04 k373379320

https://github.com/plausiblelabs/plcrashreporter/commit/8e143316c26fe73bc9248c4c3d955e743cdbce59

k373379320 avatar Apr 30 '19 10:04 k373379320