* Another buffer overflow in config.c found by Albert Lee

* Python 2.5 warning fixed
This commit is contained in:
alexhudson
2007-07-02 20:34:29 +00:00
parent 003986cefc
commit c33882cc1c
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -66,7 +66,7 @@ StoreAgentReadConfiguration(BOOL *recover)
// which hosts do we trust?
StoreAgent.trustedHosts.count = 2;
StoreAgent.trustedHosts.hosts = MemRealloc(StoreAgent.trustedHosts.hosts, 2 + 2);
StoreAgent.trustedHosts.hosts = MemRealloc(StoreAgent.trustedHosts.hosts, sizeof(unsigned long) * 2);
if (!StoreAgent.trustedHosts.hosts) {
StoreAgent.trustedHosts.count = 0;
} else {
@@ -106,7 +106,7 @@ StoreAgentReadConfiguration(BOOL *recover)
MDBRead(MSGSRV_AGENT_STORE, MSGSRV_A_STORE_TRUSTED_HOSTS, vs);
StoreAgent.trustedHosts.hosts = MemRealloc(StoreAgent.trustedHosts.hosts,
StoreAgent.trustedHosts.count + 2);
StoreAgent.trustedHosts.count * sizeof(unsigned long));
if (!StoreAgent.trustedHosts.hosts) {
StoreAgent.trustedHosts.count = 0;
}
+1 -1
View File
@@ -3,7 +3,7 @@ Iterator based sre token scanner
"""
import sre_parse, sre_compile, sre_constants
from sre_constants import BRANCH, SUBPATTERN
from sre import VERBOSE, MULTILINE, DOTALL
from re import VERBOSE, MULTILINE, DOTALL
import re
__all__ = ['Scanner', 'pattern']