Maciej Karpiuk fixed a crash that would occur if we passed Curl_strerror()
an unknown error number on glibc systems. http://curl.haxx.se/bug/view.cgi?id=1532289
This commit is contained in:
7
CHANGES
7
CHANGES
@@ -6,8 +6,13 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel (1 August 2006)
|
||||||
|
- Maciej Karpiuk fixed a crash that would occur if we passed Curl_strerror()
|
||||||
|
an unknown error number on glibc systems.
|
||||||
|
http://curl.haxx.se/bug/view.cgi?id=1532289
|
||||||
|
|
||||||
Daniel (31 July 2006)
|
Daniel (31 July 2006)
|
||||||
- *ARLERT* curl_multi_socket() and curl_multi_socket_all() got modified
|
- *ALERT* curl_multi_socket() and curl_multi_socket_all() got modified
|
||||||
prototypes: they both now provide the number of running handles back to the
|
prototypes: they both now provide the number of running handles back to the
|
||||||
calling function. It makes the functions resemble the good old
|
calling function. It makes the functions resemble the good old
|
||||||
curl_multi_perform() more and provides a nice way to know when the multi
|
curl_multi_perform() more and provides a nice way to know when the multi
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ This release includes the following changes:
|
|||||||
|
|
||||||
This release includes the following bugfixes:
|
This release includes the following bugfixes:
|
||||||
|
|
||||||
|
o Curl_strerror() crash on unknown errors
|
||||||
o changing Content-Type when doing formposts
|
o changing Content-Type when doing formposts
|
||||||
o added CURL_EXTERN to a few recent multi functions that lacked them
|
o added CURL_EXTERN to a few recent multi functions that lacked them
|
||||||
o splay-tree related problems for internal expire time handling
|
o splay-tree related problems for internal expire time handling
|
||||||
@@ -49,6 +50,7 @@ advice from friends like these:
|
|||||||
|
|
||||||
Dan Fandrich, Peter Silva, Arve Knudsen, Michael Wallner, Toshiyuki Maezawa,
|
Dan Fandrich, Peter Silva, Arve Knudsen, Michael Wallner, Toshiyuki Maezawa,
|
||||||
Ingmar Runge, Ates Goral, David McCreedy, Jari Sundell, Georg Horn,
|
Ingmar Runge, Ates Goral, David McCreedy, Jari Sundell, Georg Horn,
|
||||||
Gisle Vanem, Yang Tse, Michael Jerris, Dan Nelson, Yves Lejeune
|
Gisle Vanem, Yang Tse, Michael Jerris, Dan Nelson, Yves Lejeune,
|
||||||
|
Maciej Karpiuk
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 2004, 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 2004 - 2006, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@@ -637,8 +637,11 @@ const char *Curl_strerror(struct connectdata *conn, int err)
|
|||||||
char *msg = strerror_r(err, buffer, sizeof(buffer));
|
char *msg = strerror_r(err, buffer, sizeof(buffer));
|
||||||
/* this version of strerror_r() only *might* use the buffer we pass to
|
/* this version of strerror_r() only *might* use the buffer we pass to
|
||||||
the function, but it always returns the error message as a pointer,
|
the function, but it always returns the error message as a pointer,
|
||||||
so we must copy that string unconditionally */
|
so we must copy that string unconditionally (if non-NULL) */
|
||||||
strncpy(buf, msg, max);
|
if(msg)
|
||||||
|
strncpy(buf, msg, max);
|
||||||
|
else
|
||||||
|
snprintf(buf, max, "Unknown error %d", err);
|
||||||
}
|
}
|
||||||
#endif /* end of HAVE_GLIBC_STRERROR_R */
|
#endif /* end of HAVE_GLIBC_STRERROR_R */
|
||||||
#else /* HAVE_STRERROR_R */
|
#else /* HAVE_STRERROR_R */
|
||||||
|
|||||||
Reference in New Issue
Block a user