[Bug 4771] New: Unchecked calls to PyInt_FromLong in parsers.c and osutils.c

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Fri Aug 7 13:46:26 UTC 2015


http://bz.selenic.com/show_bug.cgi?id=4771

          Priority: normal
            Bug ID: 4771
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: Unchecked calls to PyInt_FromLong in parsers.c and
                    osutils.c
          Severity: bug
    Classification: Unclassified
                OS: Mac OS
          Reporter: lcharignon at fb.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.5
         Component: Mercurial
           Product: Mercurial

As of 79f0cb97d753 we have 8 cases where we don't check the return value of
PyInt_FromLong to make sure that it is not NULL:

osutil.c
67:             return PyInt_FromLong(((struct listdir_stat *)self)->st.name); 
parsers.c
400:            return PyInt_FromLong(t->mode);
402:            return PyInt_FromLong(t->size);
404:            return PyInt_FromLong(t->mtime);
--
1175:                   PySet_Add(phaseset, PyInt_FromLong(i));
1177:           PyList_SET_ITEM(phaseslist, i, PyInt_FromLong(phase));
--
1547:           return PyInt_FromLong(rev);
--
1642:   return PyInt_FromLong(rev);

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list