cURL / Mailing Lists / curl-users / Single Mail

curl-users

sws bug

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Fri, 8 Aug 2003 16:51:44 +0200

Hi,

I'm trying to adapt the curl-tests for Windows and got stuck in a
hard to find bug in sws. It crashed inside ntdll.dll for no apparent
reason. I then made a malloc-debug version and found that appendstring()
writes past end of allocated area by 1 byte.

I assume other OS's are more forgiving than Windows, but here's a
patch:

--- ./tests/server/getpart.c.orig Thu Jan 23 11:59:28 2003
+++ ./tests/server/getpart.c Fri Aug 8 16:30:12 2003
@@ -20,7 +20,7 @@
 {
   int len = strlen(buffer);

- if((len + *stringlen) > *stralloc) {
+ if((len + *stringlen) >= *stralloc) {
     char *newptr= realloc(string, *stralloc*2);

-------------------------

Most of tests are okay (after some tweaking the .pl-files), but
test 22 is IMHO impossible to do on a typical Win-shell. How
could this:
  %HOSTIP:%HOSTPORT/`perl -e 'print "a" x 10000;'`/22

be made compatible for all shells? I tried:
  --data - -G | perl -e `print "%HOSTIP:%HOSTPORT/"; print "a" x 10000; print "/22";`

but my ActiveState perl seems broken in this regard. From cmd or 4nt prompt:
  perl -e `print "127.0.0.1:8999";`

gives me absolutely nothing ??

--
Gisle V.
# rm /bin/laden 
/bin/laden: Not found 
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
Received on 2003-08-08