|
{ |
|
char *reqstr = NULL; // the request as a string (uri) |
|
char *tmp = NULL; // a working variable to "hack" out the space seperated string |
|
char *tmp2 = NULL; // a copy of the request to work on |
|
|
|
reqstr = (char *)calloc( MAX_REQUEST, sizeof(char)); |
|
|
|
tmp2 = reqstr; |
|
|
|
// To grab the first line GET / HTTP/1.0 ... etc |
|
char * firstLinePtr = fgets( reqstr, MAX_REQUEST, clientfp ); |
Filename: fbClient.cpp
Line: 90
CWE: 252 (Unchecked Return Value)
The result of this call to calloc() is not checked for success before being used. This can result in application instability or crashing if memory is not available. Be sure to check the result and make sure it is correct before use. Some functions return a pointer which should be validated as not NULL before use. Other functions return integers or Boolean values that must either be zero or non-zero for the results of the function to be used. Consult the API documentation to determine what a correct result is from the function call. Note: These flaws were previously reported as CWE 391. Following Mitre decision to plan for deprecation of CWE 391, CWE 252 was identified as re-categorization for these findings. References: CWE OWASP/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode
flashback-linux//fbClient.cpp
Lines 85 to 95 in 3ef6ccd
Filename: fbClient.cpp
Line: 90
CWE: 252 (Unchecked Return Value)
The result of this call to calloc() is not checked for success before being used. This can result in application instability or crashing if memory is not available. Be sure to check the result and make sure it is correct before use. Some functions return a pointer which should be validated as not NULL before use. Other functions return integers or Boolean values that must either be zero or non-zero for the results of the function to be used. Consult the API documentation to determine what a correct result is from the function call. Note: These flaws were previously reported as CWE 391. Following Mitre decision to plan for deprecation of CWE 391, CWE 252 was identified as re-categorization for these findings. References: CWE OWASP/nDon't know how to fix this? Don't know why this was reported?
Get Assistance from Veracode