5 Commits

Author SHA1 Message Date
Xavier Roche
b75488dec6 created tag 3.48.19 2014-07-28 21:16:18 +00:00
Xavier Roche
9285cfa1bb 3.48.19 2014-07-28 21:02:00 +00:00
Xavier Roche
02eb2862d2 Added testcase for 'strlen(copyBuff) == qLen failed at htslib.c:3458' 2014-07-28 20:56:57 +00:00
Xavier Roche
0ac9c0df32 Fixed 'strlen(copyBuff) == qLen failed at htslib.c:3458' assertion failure.
Rationale: strncat(..., ..., (size_t) -1) does not behave gently on Linux, and is not equivalent to strcat(..., ...) when using optimizations (could it be a corner-case bug ?)
2014-07-28 20:56:38 +00:00
Xavier Roche
da41e9a7a1 Additional message when crashing to report the issue. 2014-07-20 09:19:50 +00:00
9 changed files with 52 additions and 26 deletions

20
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for httrack 3.48.18.
# Generated by GNU Autoconf 2.69 for httrack 3.48.19.
#
# Report bugs to <roche+packaging@httrack.com>.
#
@@ -616,8 +616,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='httrack'
PACKAGE_TARNAME='httrack'
PACKAGE_VERSION='3.48.18'
PACKAGE_STRING='httrack 3.48.18'
PACKAGE_VERSION='3.48.19'
PACKAGE_STRING='httrack 3.48.19'
PACKAGE_BUGREPORT='roche+packaging@httrack.com'
PACKAGE_URL='http://www.httrack.com/'
@@ -1356,7 +1356,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures httrack 3.48.18 to adapt to many kinds of systems.
\`configure' configures httrack 3.48.19 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1426,7 +1426,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of httrack 3.48.18:";;
short | recursive ) echo "Configuration of httrack 3.48.19:";;
esac
cat <<\_ACEOF
@@ -1537,7 +1537,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
httrack configure 3.48.18
httrack configure 3.48.19
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2169,7 +2169,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by httrack $as_me 3.48.18, which was
It was created by httrack $as_me 3.48.19, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2990,7 +2990,7 @@ fi
# Define the identity of the package.
PACKAGE='httrack'
VERSION='3.48.18'
VERSION='3.48.19'
cat >>confdefs.h <<_ACEOF
@@ -14024,7 +14024,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by httrack $as_me 3.48.18, which was
This file was extended by httrack $as_me 3.48.19, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -14091,7 +14091,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
httrack config.status 3.48.18
httrack config.status 3.48.19
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

View File

@@ -1,6 +1,6 @@
AC_PREREQ(2.59)
AC_INIT([httrack], [3.48.18], [roche+packaging@httrack.com], [httrack], [http://www.httrack.com/])
AC_INIT([httrack], [3.48.19], [roche+packaging@httrack.com], [httrack], [http://www.httrack.com/])
AC_COPYRIGHT([
HTTrack Website Copier, Offline Browser for Windows and Unix
Copyright (C) 1998-2014 Xavier Roche and other contributors

7
debian/changelog vendored
View File

@@ -1,3 +1,10 @@
httrack (3.48.19-1) unstable; urgency=low
* Updated to 3.48.19 (3.48-19)
closes:#756328
-- Xavier Roche <xavier@debian.org> Mon, 28 Jul 2014 22:52:19 +0200
httrack (3.48.18-1) unstable; urgency=low
* Updated to 3.48.18 (3.48-18)

View File

@@ -4,7 +4,8 @@ HTTrack Website Copier release history:
This file lists all changes and fixes that have been made for HTTrack.
3.48-18
3.48-19
+ Fixed: assertion failure at htslib.c:3458 (strlen(copyBuff) == qLen) seen on Linux
+ Fixed: infamous crashes inside the DNS cache due to a corruption within the option structure (E.Kalinowski/karbofos)
+ New: added minimalistic crash reporting on Windows and Linux
+ Fixed: URL list not working anymore (tom swift)

View File

@@ -1,7 +1,7 @@
.\" Process this file with
.\" groff -man -Tascii httrack.1
.\"
.TH httrack 1 "12 July 2014" "httrack website copier"
.TH httrack 1 "17 July 2014" "httrack website copier"
.SH NAME
httrack \- offline browser : copy websites to a local directory
.SH SYNOPSIS

View File

@@ -130,6 +130,16 @@ HTSEXT_API int hts_main(int argc, char **argv) {
return ret;
}
// very minimalistic internal tests
static void basic_selftests(void) {
// BUG 756328
const char *const source = "/intent/tweet?url=https%3A%2F%2Fwww.httrack.com%2Fvacatures%2F1562519%2Fmedewerker-data-services&text=Medewerker+Data+Services&via=httrackcom";
char buffer[1024];
fil_normalized(source, buffer);
// MD5 selftests
md5selftest();
}
static int hts_main_internal(int argc, char **argv, httrackp * opt);
// Main, récupère les paramètres et appelle le robot
@@ -2432,7 +2442,7 @@ static int hts_main_internal(int argc, char **argv, httrackp * opt) {
return 0;
break;
case '7': // hashtable selftest: httrack -#7 nb_entries
md5selftest();
basic_selftests();
if (++na < argc) {
char *const snum = strdup(argv[na]);
unsigned long count = 0;

View File

@@ -36,8 +36,8 @@ Please visit our Website: http://www.httrack.com
#define HTTRACK_GLOBAL_DEFH
// Version (also check external version information)
#define HTTRACK_VERSION "3.48-18"
#define HTTRACK_VERSIONID "3.48.18"
#define HTTRACK_VERSION "3.48-19"
#define HTTRACK_VERSIONID "3.48.19"
#define HTTRACK_AFF_VERSION "3.x"
#define HTTRACK_LIB_VERSION "2.0"

View File

@@ -130,11 +130,23 @@ static HTS_UNUSED void htssafe_compile_time_check_(void) {
*/
#define strncatbuff(A, B, N) \
( HTS_IS_NOT_CHAR_BUFFER(A) \
? strncat(A, B, N) \
? ( (N) != (size_t) -1 ? strncat(A, B, N) : strcat(A, B) ) \
: strncat_safe_(A, sizeof(A), B, \
HTS_IS_NOT_CHAR_BUFFER(B) ? (size_t) -1 : sizeof(B), N, \
"overflow while appending '" #B "' to '"#A"'", __FILE__, __LINE__) )
/**
* Append characters of "B" to "A".
* If "A" is a char[] variable whose size is not sizeof(char*), then the size
* is assumed to be the capacity of this array.
*/
#define strcatbuff(A, B) \
( HTS_IS_NOT_CHAR_BUFFER(A) \
? strcat(A, B) \
: strncat_safe_(A, sizeof(A), B, \
HTS_IS_NOT_CHAR_BUFFER(B) ? (size_t) -1 : sizeof(B), (size_t) -1, \
"overflow while appending '" #B "' to '"#A"'", __FILE__, __LINE__) )
/**
* Copy characters from "B" to "A".
* If "A" is a char[] variable whose size is not sizeof(char*), then the size
@@ -147,15 +159,6 @@ static HTS_UNUSED void htssafe_compile_time_check_(void) {
HTS_IS_NOT_CHAR_BUFFER(B) ? (size_t) -1 : sizeof(B), \
"overflow while copying '" #B "' to '"#A"'", __FILE__, __LINE__) )
/* note: "size_t is an unsigned integral type" */
/**
* Append characters of "B" to "A".
* If "A" is a char[] variable whose size is not sizeof(char*), then the size
* is assumed to be the capacity of this array.
*/
#define strcatbuff(A, B) strncatbuff(A, B, (size_t) -1)
/**
* Append characters of "B" to "A", "A" having a maximum capacity of "S".
*/
@@ -188,6 +191,7 @@ static HTS_INLINE HTS_UNUSED char* strncat_safe_(char *const dest, const size_t
const char *exp, const char *file, int line) {
const size_t source_len = strlen_safe_(source, sizeof_source, file, line);
const size_t dest_len = strlen_safe_(dest, sizeof_dest, file, line);
/* note: "size_t is an unsigned integral type" ((size_t) -1 is positive) */
const size_t source_copy = source_len <= n ? source_len : n;
const size_t dest_final_len = dest_len + source_copy;
assertf__(dest_final_len < sizeof_dest, exp, file, line);

View File

@@ -910,6 +910,8 @@ static size_t print_num(char *buffer, int num) {
static void sig_fatal(int code) {
const char msg[] = "\nCaught signal ";
const char msgreport[] =
"\nPlease report the problem at http://forum.httrack.com\n";
char buffer[256];
size_t size;
@@ -922,6 +924,8 @@ static void sig_fatal(int code) {
buffer[size++] = '\n';
(void) (write(FD_ERR, buffer, size) == size);
print_backtrace();
(void) (write(FD_ERR, msgreport, sizeof(msgreport) - 1)
== sizeof(msgreport) - 1);
abort();
}