KKoukuntla014680 (Community Member) asked a question.

Unchecked Return Value

Veracode reported "Unchecked Return Value" issue for below C language code snippet, how do we fix this?

 

char* str1;

char *oPtr = NULL;

char * pstr1;

 

pstr1 = oPtr = strdup(str1);

 

if (oPtr != NULL){

      free(oPtr);

      oPtr = NULL;

}


  • Hi @KKoukuntla014680 (Community Member)​ ,

     

    I'm not seeing why we would report a CWE 252 flaw on this code.

    I would recommend you contact our technical support team. Here's how you can log a case:

    1. Navigate to the upper right corner of any page in the Community, click on your user avatar.

    2. Select Contact Support from the drop-down menu.

    Please include in your case a link to the results in the Veracode Platform ( for example something like: https://analysiscenter.veracode.com/auth/index.jsp#ReviewResultsStaticFlaws:... ) and the ID of the flaw.

     

    Thank you,

    Boy Baukema

    Expand Post

Topics (4)

No articles found
Loading

Ask the Community

Get answers, share a use case, discuss your favorite features, or get input from the community.