| 1 | From http://swish-e.org/archive/2015-09/13295.html
|
| 2 |
|
| 3 | |
| 4 | |
| 5 | @@ -995,7 +995,7 @@ void remove_worddata_longs(unsigned char *worddata,int *sz_worddata)
|
| 6 | progerr("Internal error in remove_worddata_longs");
|
| 7 |
|
| 8 | /* dst may be smaller than src. So move the data */
|
| 9 | - memcpy(dst,src,data_len);
|
| 10 | + memmove(dst,src,data_len);
|
| 11 |
|
| 12 | /* Increase pointers */
|
| 13 | src += data_len;
|
| 14 | |
| 15 | |
| 16 | @@ -280,7 +280,7 @@ static SWISH_HEADER_VALUE fetch_single_header( IndexFILE *indexf, HEADER_MAP *he
|
| 17 |
|
| 18 | case SWISH_NUMBER:
|
| 19 | case SWISH_BOOL:
|
| 20 | - value.number = *(unsigned long *) data_pointer;
|
| 21 | + value.number = *(unsigned int *) data_pointer;
|
| 22 |
|
| 23 | /* $$$ Ugly hack alert! */
|
| 24 | /* correct for removed files */
|
| 25 | |
| 26 | |
| 27 | @@ -27,6 +27,7 @@ use LWP::UserAgent;
|
| 28 | use HTTP::Status;
|
| 29 | use HTML::Parser 3.00;
|
| 30 | use HTML::LinkExtor;
|
| 31 | +use Encode;
|
| 32 |
|
| 33 | if (scalar(@ARGV) != 2) {
|
| 34 | print STDERR "Usage: $0 localpath url\n";
|
| 35 | @@ -94,7 +95,7 @@ use HTML::LinkExtor;
|
| 36 | # Don't allow links above the base
|
| 37 | $URI::ABS_REMOTE_LEADING_DOTS = 1;
|
| 38 |
|
| 39 | - $p->parse( $$content_ref );
|
| 40 | + $p->parse( decode_utf8 $$content_ref );
|
| 41 | close( LINKS );
|
| 42 |
|
| 43 | exit;
|