Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def image_load(img):
rtn = pin.RTN_FindByName(img, "realloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "realloc", rtn, 3, realloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "realloc", rtn, 3, realloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "malloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "malloc", rtn, 1, malloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "malloc", rtn, 1, malloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "free")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "free", rtn, 1, free)
pin.RTN_Close(rtn)
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "realloc", rtn, 3, realloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "realloc", rtn, 3, realloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "malloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "malloc", rtn, 1, malloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "malloc", rtn, 1, malloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "free")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "free", rtn, 1, free)
pin.RTN_Close(rtn)
def image_load(img):
rtn = pin.RTN_FindByName(img, "realloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "realloc", rtn, 3, realloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "realloc", rtn, 3, realloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "malloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "malloc", rtn, 1, malloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "malloc", rtn, 1, malloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "free")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "free", rtn, 1, free)
pin.RTN_Close(rtn)
def image_load(img):
rtn = pin.RTN_FindByName(img, "realloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "realloc", rtn, 3, realloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "realloc", rtn, 3, realloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "malloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "malloc", rtn, 1, malloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "malloc", rtn, 1, malloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "free")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "free", rtn, 1, free)
pin.RTN_Close(rtn)
def image_load(img):
rtn = pin.RTN_FindByName(img, "realloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "realloc", rtn, 3, realloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "realloc", rtn, 3, realloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "malloc")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "malloc", rtn, 1, malloc_before)
pin.RTN_InsertCall(pin.IPOINT_AFTER, "malloc", rtn, 1, malloc_after)
pin.RTN_Close(rtn)
rtn = pin.RTN_FindByName(img, "free")
if pin.RTN_Valid(rtn):
pin.RTN_Open(rtn)
pin.RTN_InsertCall(pin.IPOINT_BEFORE, "free", rtn, 1, free)
pin.RTN_Close(rtn)