Mageia Bugzilla – Attachment 4577 Details for
Bug 11880
Searching the latest cauldron x86_64 swish-e indexes is prone to failure or segault
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Proposed patch
swish-e-typefixes.patch (text/plain), 1.47 KB, created by
William Murphy
on 2013-12-05 17:25:13 CET
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
William Murphy
Created:
2013-12-05 17:25:13 CET
Size:
1.47 KB
patch
obsolete
>diff --git a/src/compress.c b/src/compress.c >index 0ea3a87..77f3fcf 100644 >--- a/src/compress.c >+++ b/src/compress.c >@@ -995,7 +995,7 @@ void remove_worddata_longs(unsigned char *worddata,int *sz_worddata) > progerr("Internal error in remove_worddata_longs"); > > /* dst may be smaller than src. So move the data */ >- memcpy(dst,src,data_len); >+ memmove(dst,src,data_len); > > /* Increase pointers */ > src += data_len; >diff --git a/src/headers.c b/src/headers.c >index 943165d..b54c85c 100755 >--- a/src/headers.c >+++ b/src/headers.c >@@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he > > case SWISH_NUMBER: > case SWISH_BOOL: >- value.number = *(unsigned long *) data_pointer; >+ value.number = *(unsigned int *) data_pointer; > > /* $$$ Ugly hack alert! */ > /* correct for removed files */ >diff --git a/src/swishspider b/src/swishspider >index 001ee2e..72c374d 100755 >--- a/src/swishspider >+++ b/src/swishspider >@@ -27,6 +27,7 @@ use LWP::UserAgent; > use HTTP::Status; > use HTML::Parser 3.00; > use HTML::LinkExtor; >+use Encode; > > if (scalar(@ARGV) != 2) { > print STDERR "Usage: $0 localpath url\n"; >@@ -94,7 +95,7 @@ use HTML::LinkExtor; > # Don't allow links above the base > $URI::ABS_REMOTE_LEADING_DOTS = 1; > >- $p->parse( $$content_ref ); >+ $p->parse( decode_utf8 $$content_ref ); > close( LINKS ); > > exit;
diff --git a/src/compress.c b/src/compress.c index 0ea3a87..77f3fcf 100644 --- a/src/compress.c +++ b/src/compress.c @@ -995,7 +995,7 @@ void remove_worddata_longs(unsigned char *worddata,int *sz_worddata) progerr("Internal error in remove_worddata_longs"); /* dst may be smaller than src. So move the data */ - memcpy(dst,src,data_len); + memmove(dst,src,data_len); /* Increase pointers */ src += data_len; diff --git a/src/headers.c b/src/headers.c index 943165d..b54c85c 100755 --- a/src/headers.c +++ b/src/headers.c @@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he case SWISH_NUMBER: case SWISH_BOOL: - value.number = *(unsigned long *) data_pointer; + value.number = *(unsigned int *) data_pointer; /* $$$ Ugly hack alert! */ /* correct for removed files */ diff --git a/src/swishspider b/src/swishspider index 001ee2e..72c374d 100755 --- a/src/swishspider +++ b/src/swishspider @@ -27,6 +27,7 @@ use LWP::UserAgent; use HTTP::Status; use HTML::Parser 3.00; use HTML::LinkExtor; +use Encode; if (scalar(@ARGV) != 2) { print STDERR "Usage: $0 localpath url\n"; @@ -94,7 +95,7 @@ use HTML::LinkExtor; # Don't allow links above the base $URI::ABS_REMOTE_LEADING_DOTS = 1; - $p->parse( $$content_ref ); + $p->parse( decode_utf8 $$content_ref ); close( LINKS ); exit;
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 11880
: 4577