wget segfault on ppc

2001-10-08 Thread David Roundy

Hello.  I have a patch to fix a problem with wget segfaulting on the
powerpc platform.  It happens in the logvprintf routine, due to differences
in the handling of va_lists on ppc vs. x86.  The problem was that it was
reusing a va_list after it had already been exhausted, and the following
fix should be portable on at least any platform using gcc.

I'm afraid the the patch may be malformed wrt whitespace, but it is small
enough that you shouldn't have a problem applying it by hand.

--- wget-1.7.old/src/log.c  Sun May 27 12:35:05 2001
+++ wget-1.7/src/log.c  Fri Sep 28 09:29:48 2001
@@ -280,9 +280,12 @@
 static void
 logvprintf (enum log_options o, const char *fmt, va_list args)
 {
+  va_list all_the_args;
+
   CHECK_VERBOSE (o);
   CANONICALIZE_LOGFP_OR_RETURN;

+  __va_copy(all_the_args,args);
   /* Originally, we first used vfprintf(), and then checked whether
  the message needs to be stored with vsprintf().  However, Watcom
  C didn't like ARGS being used twice, so now we first vsprintf()
@@ -310,7 +313,9 @@
  the systems where vsnprintf() is not available, we use
  the implementation from snprintf.c which does return the
  correct value.  */
- int numwritten =3D vsnprintf (write_ptr, available_size, fmt, args);
+  int numwritten;
+  __va_copy(args,all_the_args);
+ numwritten =3D vsnprintf (write_ptr, available_size, fmt, args);

  /* vsnprintf() will not step over the limit given by
  available_size.  If it fails, it will return either -1



-- 
David Roundy
http://civet.berkeley.edu/droundy/



msg01993/pgp0.pgp
Description: PGP signature


ampersand qoutied

2001-10-08 Thread Dmitry . Karpov

When I am running
wget 'http://www.pi2.ru:8101/cgi-bin/test-cgi?a=pre&b=post'
I have
QUERY_STRING = a=pre%26b=post
but when I put this URL to browser, I have
QUERY_STRING = a=pre&b=post

How can I download CGI-replyes via wget?

Please, reply directly.



wget bug

2001-10-08 Thread Dmitry . Karpov

Dear sir.

When I out to my browser (NN'3) line
http://find.infoart.ru/cgi-bin/yhs.pl?hidden=http%3A%2F%2F194.67.26.82&word=FreeBSD
wget working correctly.

When I put this line to wget, wget change this line;
argument hidden is "http:/194.67.26.82&word",
argument word is empty. Where I am wrong?



Re: wget segfaults when it encounters large "meta" tags

2001-10-08 Thread Ian Abbott

On 7 Oct 2001, at 18:34, Eugenio Diaz wrote:

> While trying to websuck nice ladies from http://www.gemidos.com.ar using
> wget, I found that it segfaulted. A quick look at the html documents
> revealed multiple huge "meta" tags (I guess a common practive among sex
> sites, to get more hits from search engines). I applied the "-Gmeta"
> option, and now it works fine on the site.

I think the problem with the large tags was fixed at the end of 
June, but there is no official release with this fix yet, so you'll 
have to get the development version from CVS.