diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-06-30 13:28:39 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-07-01 15:50:35 -0600 |
commit | fc16d51c7349b07a405085fd80548a6d0aaf31e8 (patch) | |
tree | 01f94fb867a60e206fd59564f877aa5dc426bcad /lib | |
parent | 6098df0ea1aec1c25334b4229fe196ca02c0fc26 (diff) | |
download | ds-fc16d51c7349b07a405085fd80548a6d0aaf31e8.tar.gz ds-fc16d51c7349b07a405085fd80548a6d0aaf31e8.tar.xz ds-fc16d51c7349b07a405085fd80548a6d0aaf31e8.zip |
Bug 609590 - fix coverity Defect Type: Memory - corruptions issues
https://bugzilla.redhat.com/show_bug.cgi?id=609590
Resolves: bug 609590
Bug Description: fix coverity Defect Type: Memory - corruptions issues
Reviewed by: nhosoi (Thanks!)
Branch: HEAD
Fix Description: Do not allow pt->pt_sizendx to be == PLMAXSIZENDX
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base/plist.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/base/plist.cpp b/lib/base/plist.cpp index 3c3192d6..56873ce2 100644 --- a/lib/base/plist.cpp +++ b/lib/base/plist.cpp @@ -823,7 +823,8 @@ PListNameProp(PList_t plist, int pindex, const char *pname) /* Is it time to grow the hash table? */ i = PLSIZENDX(pt->pt_sizendx); - if (((size_t)pt->pt_sizendx < PLMAXSIZENDX) && + /* cannot allow pt->pt_sizendx == PLMAXSIZENDX */ + if (((size_t)(pt->pt_sizendx + 1) < PLMAXSIZENDX) && pt->pt_nsyms >= (i + i)) { PLSymbolTable_t *npt; |