Commit 71be565c authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

curl: -O crash on windows

The -O option caused curl to crash on windows and DOS due to the
tool writing out of boundary memory.
parent 81512cc0
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -6,6 +6,10 @@


                                  Changelog
                                  Changelog


Daniel Stenberg (21 Apr 2010)
- The -O option caused curl to crash on windows and DOS due to the tool
  writing out of boundary memory.

Yang Tse (20 Apr 2010)
Yang Tse (20 Apr 2010)
- Ruslan Gazizov detected that MSVC makefiles were using wsock32.lib instead
- Ruslan Gazizov detected that MSVC makefiles were using wsock32.lib instead
  of ws2_32.lib, this generated linking issues on MSVC IPv6 enabled builds
  of ws2_32.lib, this generated linking issues on MSVC IPv6 enabled builds
+1 −0
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ This release includes the following bugfixes:
 o GnuTLS: SSL handshake phase is non-blocking
 o GnuTLS: SSL handshake phase is non-blocking
 o -J/--remote-header-name strips CRLF
 o -J/--remote-header-name strips CRLF
 o MSVC makefiles now use ws2_32.lib instead of wsock32.lib
 o MSVC makefiles now use ws2_32.lib instead of wsock32.lib
 o -O crash on windows


This release includes the following known bugs:
This release includes the following known bugs:


+2 −1
Original line number Original line Diff line number Diff line
@@ -5839,7 +5839,8 @@ rename_if_dos_device_name (char *file_name)
static char *sanitize_dos_name(char *fn)
static char *sanitize_dos_name(char *fn)
{
{
  char tmpfn[PATH_MAX];
  char tmpfn[PATH_MAX];
  fn[PATH_MAX-1]=0; /* ensure fn is not too long by possibly truncating it */
  if(strlen(fn) >= PATH_MAX)
    fn[PATH_MAX-1]=0; /* truncate it */
  strcpy(tmpfn, msdosify(fn));
  strcpy(tmpfn, msdosify(fn));
  free(fn);
  free(fn);
  return strdup(rename_if_dos_device_name(tmpfn));
  return strdup(rename_if_dos_device_name(tmpfn));