* Another buffer overflow in config.c found by Albert Lee
* Python 2.5 warning fixed
This commit is contained in:
@@ -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
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user