diff options
| author | Endi S. Dewata <edewata@redhat.com> | 2010-07-06 19:18:19 -0500 |
|---|---|---|
| committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-08-23 11:07:31 -0700 |
| commit | 9020d0a1ba5766ae40d0aefe8b4b46e0e6903ee6 (patch) | |
| tree | fd5664e81d2f2c375a36d1d588ac6a176612b077 /lib/libaccess | |
| parent | 2ff2c9da762d67628cf25a1ceda3b1dbb9218776 (diff) | |
| download | ds-9020d0a1ba5766ae40d0aefe8b4b46e0e6903ee6.tar.gz ds-9020d0a1ba5766ae40d0aefe8b4b46e0e6903ee6.tar.xz ds-9020d0a1ba5766ae40d0aefe8b4b46e0e6903ee6.zip | |
Bug 610119 - fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
https://bugzilla.redhat.com/show_bug.cgi?id=610119
Resolves: bug 610119
Bug description: Fix coverify Defect Type: Null pointer dereferences issues 12167 - 12199
Fix description: Catch possible NULL pointer in LASDnsBuild().
Diffstat (limited to 'lib/libaccess')
| -rw-r--r-- | lib/libaccess/lasdns.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libaccess/lasdns.cpp b/lib/libaccess/lasdns.cpp index 3bcbba10..a81f6808 100644 --- a/lib/libaccess/lasdns.cpp +++ b/lib/libaccess/lasdns.cpp @@ -152,6 +152,12 @@ LASDnsBuild(NSErr_t *errp, char *attr_pattern, LASDnsContext_t *context, int ali PRHostEnt *he, host; #endif + if (attr_pattern == NULL) { + nserrGenerate(errp, ACLERRINVAL, ACLERR4770, ACL_Program, 1, + XP_GetAdminStr(DBT_lasdnsbuildInvalidAttributePattern_)); + return LAS_EVAL_INVALID; + } + context->Table = PR_NewHashTable(0, PR_HashCaseString, PR_CompareCaseStrings, |
