Addressed issues found during the SuSE security review.
This commit is contained in:
@@ -36,7 +36,7 @@ typedef struct _NormalizedHostNameCacheEntry
|
||||
LIST_ENTRY listEntry;
|
||||
char *pHostName;
|
||||
char *pNormalizedHostName;
|
||||
int buffLengthRequired;
|
||||
size_t buffLengthRequired;
|
||||
|
||||
} NormalizedHostNameCacheEntry, *PNormalizedHostNameCacheEntry;
|
||||
|
||||
@@ -458,7 +458,7 @@ NormalizeHostName(
|
||||
NI_NAMEREQD) == 0)
|
||||
{
|
||||
// We resolved the address to a DNS name, use it as the normalized name.
|
||||
pEntry->buffLengthRequired = (int) strlen(pDnsHostName) + 1;
|
||||
pEntry->buffLengthRequired = strlen(pDnsHostName) + 1;
|
||||
pEntry->pNormalizedHostName = (char*) malloc(pEntry->buffLengthRequired);
|
||||
if (pEntry->pNormalizedHostName)
|
||||
{
|
||||
@@ -476,7 +476,7 @@ NormalizeHostName(
|
||||
|
||||
// Not able to resolve the name in DNS, just use the host name as
|
||||
// the normalized name.
|
||||
pEntry->buffLengthRequired = (int) strlen(pHostName) + 1;
|
||||
pEntry->buffLengthRequired = strlen(pHostName) + 1;
|
||||
pEntry->pNormalizedHostName = (char*) malloc(pEntry->buffLengthRequired);
|
||||
if (pEntry->pNormalizedHostName)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user