ida icon indicating copy to clipboard operation
ida copied to clipboard

Issue with codatify (TypeError from cd.stringify)

Open mzpqnxow opened this issue 7 years ago • 5 comments

Traceback (most recent call last):
  File "C:/Program Files/IDA 7.0/plugins/codatify.py", line 376, in activate
    cd.stringify()
  File "C:/Program Files/IDA 7.0/plugins/codatify.py", line 260, in stringify
    if not idc.isASCII(idc.GetFlags(s.ea)) and idc.MakeStr(s.ea, idc.BADADDR):
  File "C:\Program Files\IDA 7.0\python\idc_bc695.py", line 113, in MakeStr
    def MakeStr(ea, endea): return create_strlit(ea, 0 if (endea) == ida_idaapi.BADADDR else endea-ea)
  File "C:\Program Files\IDA 7.0\python\idc.py", line 695, in create_strlit
    return ida_bytes.create_strlit(ea, 0 if endea == BADADDR else endea - ea, get_inf_attr(INF_STRTYPE))
  File "C:\Program Files\IDA 7.0\python\ida_bytes.py", line 1618, in create_strlit
    return _ida_bytes.create_strlit(*args)
TypeError: in method 'create_strlit', argument 2 of type 'size_t'%  ```

I have no experience with IDA plugins but I am competent with Python... but maybe there's an easy fix @devttys0  ?

mzpqnxow avatar Oct 25 '18 17:10 mzpqnxow

This is on IDA 7 x86, looking at MIPS, MIPS-I version 1

mzpqnxow avatar Oct 25 '18 17:10 mzpqnxow

@devttys0 I might just catch the TypeError and let it run for now... if you want to point me in the right direction I will try to fix it myself and PR

mzpqnxow avatar Oct 25 '18 17:10 mzpqnxow

also FYI, this is on a busybox binary.. I caught the exception and the plugin (mostly) works and finishes cleanly (it recognizes that it didn't fixup everything well)

mzpqnxow avatar Oct 25 '18 18:10 mzpqnxow

+1 i also experience this issue

eacmen avatar Sep 23 '19 15:09 eacmen

fixed like this

image

alt-fox avatar Apr 09 '20 06:04 alt-fox