cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scan-ad...@coverity.com
Subject New Defects reported by Coverity Scan for cloudstack
Date Mon, 06 Jul 2015 22:21:55 GMT

Hi,

Please find the latest report on new defect(s) introduced to cloudstack found with Coverity
Scan.

2 new defect(s) introduced to cloudstack found with Coverity Scan.
3 defect(s), reported by Coverity Scan earlier, were marked fixed in the recent build analyzed
by Coverity Scan.

New defect(s) Reported-by: Coverity Scan
Showing 2 of 2 defect(s)


** CID 1310067:  Null pointer dereferences  (NULL_RETURNS)
/server/src/com/cloud/api/ApiResponseHelper.java: 2647 in com.cloud.api.ApiResponseHelper.createResourceTagResponse(com.cloud.server.ResourceTag,
boolean)()


________________________________________________________________________________________________________
*** CID 1310067:  Null pointer dereferences  (NULL_RETURNS)
/server/src/com/cloud/api/ApiResponseHelper.java: 2647 in com.cloud.api.ApiResponseHelper.createResourceTagResponse(com.cloud.server.ResourceTag,
boolean)()
2641             response.setPortableipServiceEnabled(region.checkIfServiceEnabled(Region.Service.PortableIp));
2642             return response;
2643         }
2644     
2645         @Override
2646         public ResourceTagResponse createResourceTagResponse(ResourceTag resourceTag,
boolean keyValueOnly) {
>>>     CID 1310067:  Null pointer dereferences  (NULL_RETURNS)
>>>     Assigning: "rto" = null return value from "com.cloud.api.ApiDBUtils.newResourceTagView(com.cloud.server.ResourceTag)".
2647             ResourceTagJoinVO rto = ApiDBUtils.newResourceTagView(resourceTag);
2648             return ApiDBUtils.newResourceTagResponse(rto, keyValueOnly);
2649         }
2650     
2651         @Override
2652         public VpcOfferingResponse createVpcOfferingResponse(VpcOffering offering) {

** CID 1310072:    (NULL_RETURNS)
/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java: 221 in org.apache.cloudstack.saml.SAMLUtils.encodeSAMLRequest(org.opensaml.xml.XMLObject)()
/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java: 221 in org.apache.cloudstack.saml.SAMLUtils.encodeSAMLRequest(org.opensaml.xml.XMLObject)()


________________________________________________________________________________________________________
*** CID 1310072:    (NULL_RETURNS)
/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java: 221 in org.apache.cloudstack.saml.SAMLUtils.encodeSAMLRequest(org.opensaml.xml.XMLObject)()
215             Deflater deflater = new Deflater(Deflater.DEFLATED, true);
216             ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
217             DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream(byteArrayOutputStream,
deflater);
218             deflaterOutputStream.write(requestMessage.getBytes(Charset.forName("UTF-8")));
219             deflaterOutputStream.close();
220             String encodedRequestMessage = Base64.encodeBytes(byteArrayOutputStream.toByteArray(),
Base64.DONT_BREAK_LINES);
>>>     CID 1310072:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "encodedRequestMessage" when calling
"java.net.URLEncoder.encode(java.lang.String, java.lang.String)".
221             encodedRequestMessage = URLEncoder.encode(encodedRequestMessage, HttpUtils.UTF_8).trim();
222             return encodedRequestMessage;
223         }
224     
225         public static Response decodeSAMLResponse(String responseMessage)
226                 throws ConfigurationException, ParserConfigurationException,
/plugins/user-authenticators/saml2/src/org/apache/cloudstack/saml/SAMLUtils.java: 221 in org.apache.cloudstack.saml.SAMLUtils.encodeSAMLRequest(org.opensaml.xml.XMLObject)()
215             Deflater deflater = new Deflater(Deflater.DEFLATED, true);
216             ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
217             DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream(byteArrayOutputStream,
deflater);
218             deflaterOutputStream.write(requestMessage.getBytes(Charset.forName("UTF-8")));
219             deflaterOutputStream.close();
220             String encodedRequestMessage = Base64.encodeBytes(byteArrayOutputStream.toByteArray(),
Base64.DONT_BREAK_LINES);
>>>     CID 1310072:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be null "encodedRequestMessage" when calling
"java.net.URLEncoder.encode(java.lang.String, java.lang.String)".
221             encodedRequestMessage = URLEncoder.encode(encodedRequestMessage, HttpUtils.UTF_8).trim();
222             return encodedRequestMessage;
223         }
224     
225         public static Response decodeSAMLResponse(String responseMessage)
226                 throws ConfigurationException, ParserConfigurationException,


________________________________________________________________________________________________________
To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/943?tab=overview

To manage Coverity Scan email notifications for "dev@cloudstack.apache.org", click https://scan.coverity.com/subscriptions/edit?email=dev%40cloudstack.apache.org&token=494aabd5ba647999fa41b6d766646231


Mime
View raw message