fix 64bit conversion bug. realloc offset should have

been 64bit not 32bit in Linkdb.cpp.
This commit is contained in:
Matt Wells 2014-12-03 07:35:14 -08:00
parent 18583234c4
commit 654084f557
3 changed files with 8 additions and 1 deletions

@ -5658,7 +5658,7 @@ bool Links::addLink ( char *link , int32_t linkLen , int32_t nodeNum ,
memcpy ( newBuf , m_allocBuf , m_allocSize );
QUICKPOLL(niceness);
// update pointers to previous buffer
int32_t offset = newBuf - m_allocBuf;
int64_t offset = newBuf - m_allocBuf;
char *allocEnd = m_allocBuf + m_allocSize;
for (int32_t i = 0 ; i < m_numLinks ; i++ ) {
QUICKPOLL(niceness);

@ -581,6 +581,8 @@ bool Query::setQTerms ( Words &words , Phrases &phrases ) {
qt->m_UORedTerm = NULL;
qt->m_synonymOf = NULL;
qt->m_ignored = 0;
qt->m_term = NULL;
qt->m_termLen = 0;
// assume not a repeat of another query term (set below)
qt->m_repeat = false;
// stop word? no, we're a phrase term

@ -12535,6 +12535,11 @@ void gotCrawlInfoReply ( void *state , UdpSlot *slot ) {
// make it save to disk i guess
cr->m_needsSave = true;
// if spidering disabled in master controls then send no
// notifications
if ( ! g_conf.m_spideringEnabled )
continue;
// and we've examined at least one url. to prevent us from
// sending a notification if we haven't spidered anything
// because no seed urls have been added/injected.