(original) (raw)
[From nobody Fri Jan 11 17:08:34 2013 Return-Path: <cyrus@duff> Received: from deliver ([unix socket]) by duff with LMTPA; Fri, 11 Jan 2013 01:23:21 +0100 X-Sieve: CMU Sieve 2.4 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on duff.afaik.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=4.5 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.3.1 Delivered-To: heimes@duff.afaik.org Received: from build-l3.scan.coverity.com (unknown [208.69.177.216]) by duff.afaik.org (Postfix) with ESMTPS id DBE281233EA for lists@cheimes.de; Fri, 11 Jan 2013 01:23:18 +0100 (CET) Received: from localhost ([127.0.0.1] helo=build-l3.scan.coverity.com) by build-l3.scan.coverity.com with esmtp (Exim 4.69) (envelope-from scan-admin@coverity.com) id 1TtSan-0004tU-Kt; Thu, 10 Jan 2013 16:35:29 -0800 From: scan-admin@coverity.com To: lists@cheimes.de, CC: dvyas@coverity.com Subject: New Defects reported by Coverity Scan for Python Message-Id: E1TtSan-0004tU-Kt@build-l3.scan.coverity.com Date: Thu, 10 Jan 2013 16:35:29 -0800 Hi, Please find the latest report on new defect(s) introduced to Python found with Coverity SCAN Defect(s) Reported-by: Coverity Scan ** CID 967027: Dereference null return value (NULL_RETURNS) /Modules/_elementtree.c: 966 http://scan5.coverity.com:8080//sourcebrowser.htm?projectId=10226#mergedDefectId=967027 ** CID 967026: Dereference after null check (FORWARD_NULL) /Modules/_elementtree.c: 841 http://scan5.coverity.com:8080//sourcebrowser.htm?projectId=10226#mergedDefectId=967026 ________________________________________________________________________ CID 967027: Dereference null return value (NULL_RETURNS) /Modules/_elementtree.c: 963 ( returned_null) 960 961 /* More instance dict members than we know to handle? */ 962 tag = attrib = text = tail = children = NULL; >>> Function "PyTuple_New(Py_ssize_t)" returns null (checked 169 out of 190 times). 963 args = PyTuple_New(0); 964 error = ! PyArg_ParseTupleAndKeywords(args, state, "|$OOOOO", kwlist, &tag, 965 &attrib, &text, &tail, &children); 966 Py_DECREF(args); 967 if (error) /Modules/_elementtree.c: 963 ( var_assigned) 960 961 /* More instance dict members than we know to handle? */ 962 tag = attrib = text = tail = children = NULL; >>> Assigning: "args" = null return value from "PyTuple_New(Py_ssize_t)". 963 args = PyTuple_New(0); 964 error = ! PyArg_ParseTupleAndKeywords(args, state, "|$OOOOO", kwlist, &tag, 965 &attrib, &text, &tail, &children); 966 Py_DECREF(args); 967 if (error) /Modules/_elementtree.c: 966 ( dereference) 963 args = PyTuple_New(0); 964 error = ! PyArg_ParseTupleAndKeywords(args, state, "|$OOOOO", kwlist, &tag, 965 &attrib, &text, &tail, &children); >>> CID 967027: Dereference null return value (NULL_RETURNS) >>> Dereferencing a null pointer "args". 966 Py_DECREF(args); 967 if (error) 968 return NULL; 969 else 970 return element_setstate_from_attributes(self, tag, attrib, text, ________________________________________________________________________ CID 967026: Dereference after null check (FORWARD_NULL) /Modules/_elementtree.c: 837 ( var_compare_op) 834 PyObject *instancedict = NULL, *children; 835 836 /* Build a list of children. */ >>> Comparing "self->extra" to null implies that "self->extra" might be null. 837 children = PyList_New(self->extra ? self->extra->length : 0); 838 if (!children) 839 return NULL; 840 for (i = 0; i < PyList_GET_SIZE(children); i++) { 841 PyObject *child = self->extra->children[i]; /Modules/_elementtree.c: 841 ( var_deref_op) 838 if (!children) 839 return NULL; 840 for (i = 0; i < PyList_GET_SIZE(children); i++) { >>> CID 967026: Dereference after null check (FORWARD_NULL) >>> Dereferencing null pointer "self->extra". 841 PyObject *child = self->extra->children[i]; 842 Py_INCREF(child); 843 PyList_SET_ITEM(children, i, child); 844 } 845 ________________________________________________________________________ To view the defects in Coverity Scan visit, http://scan5.coverity.com:8080 If you don't have a username, you can request one by emailing: scan-admin@coverity.com To unsubscribe from the email notification for new defects, http://scan.coverity.com/email\_unsubscribe.html If you are project owner, you can subscribe your team member by accessing http://scan.coverity.com/email\_subscription.html ]