Age | Commit message (Collapse) | Author |
|
Fix bug from 811a693b80
|
|
some more follow-ups to 811a693b80
|
|
follow-up to 811a693b80
|
|
We had some confusions on when each function was used. We should not act
differently on different locales anyway.
|
|
Since the internal Curl_urldecode() function has a better API.
|
|
|
|
curl_printf.h defines printf to curl_mprintf, etc. This can cause
problems with external headers which may use
__attribute__((format(printf, ...))) markers etc.
To avoid that they cause problems with system includes, we include
curl_printf.h after any system headers. That makes the three last
headers to always be, and we keep them in this order:
curl_printf.h
curl_memory.h
memdebug.h
None of them include system headers, they all do funny #defines.
Reported-by: David Benjamin
Fixes #743
|
|
|
|
|
|
This header file must be included after all header files except
memdebug.h, as it does similar memory function redefinitions and can be
similarly affected by conflicting definitions in system or dependent
library headers.
|
|
|
|
Since we just started make use of free(NULL) in order to simplify code,
this change takes it a step further and:
- converts lots of Curl_safefree() calls to good old free()
- makes Curl_safefree() not check the pointer before free()
The (new) rule of thumb is: if you really want a function call that
frees a pointer and then assigns it to NULL, then use Curl_safefree().
But we will prefer just using free() from now on.
|
|
The function "free" is documented in the way that no action shall occur for
a passed null pointer. It is therefore not needed that a function caller
repeats a corresponding check.
http://stackoverflow.com/questions/18775608/free-a-null-pointer-anyway-or-check-first
This issue was fixed by using the software Coccinelle 1.0.0-rc24.
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
|
|
... and as a consequence, introduce curl_printf.h with that re-define
magic instead and make all libcurl code use that instead.
|
|
|
|
For consistency with other USE_WIN32_ defines as well as the
USE_OPENLDAP define.
|
|
|
|
|
|
Reported-by: Michael Osipov
|
|
Otherwise, the fixes in the previous commits would only be applicable
to IDN and SSPI based builds and not others such as OpenSSL with LDAP
enabled.
|
|
|
|
|
|
Use 'TCHAR *' for local attribute variable rather than 'char *'.
|
|
Use 'TCHAR *' for local DN variable rather than 'char *'.
|
|
Due to the recent modifications this function is no longer used.
|
|
ldap.c:98: warning: extra tokens at end of #endif directive
|
|
|
|
ldap.c:802: warning: comparison between signed and unsigned integer
expressions
|
|
|
|
The unescapped DN was not freed after a successful character conversion.
|
|
ldap.c:738: error: macro "LDAP_TRACE" passed 2 arguments, but takes
just 1
|
|
ldap.c:89: warning: extra tokens at end of #endif directive
|
|
|
|
|
|
|
|
As host.name may be encoded use dispname for infof() failure messages.
|
|
|
|
As we get the length for the DN and attribute variables, and we know
the length for the line terminator, pass the length values rather than
zero as this will save Curl_client_write() from having to perform an
additional strlen() call.
|
|
Fixed memory leaks from commit 086ad79970 as was noted in the commit
comments.
|
|
Fixed memory leaks from commit 086ad79970 as was noted in the commit
comments.
|
|
There might be one or two memory leaks left in the error paths.
|
|
|
|
warning: implicit declaration of function 'connclose'
|
|
Make all code use connclose() and connkeep() when changing the "close
state" for a connection. These two macros take a string argument with an
explanation, and debug builds of curl will include that in the debug
output. Helps tracking connection re-use/close issues.
|
|
This makes the findprotocol() function work as intended so that libcurl
can properly be restricted to not support HTTP while still supporting
HTTPS - since the HTTPS handler previously set both the HTTP and HTTPS
bits in the protocol field.
This fixes --proto and --proto-redir for most SSL protocols.
This is done by adding a few new convenience defines that groups HTTP
and HTTPS, FTP and FTPS etc that should then be used when the code wants
to check for both protocols at once. PROTO_FAMILY_[protocol] style.
Bug: https://github.com/bagder/curl/pull/97
Reported-by: drizzt
|
|
warning: comparison between signed and unsigned integer expressions
|
|
|
|
Make sure that the custom struct fields are only used by code that
doesn't use a struct defintion from the outside.
Attempts to fix the problem introduced in 3dc6fc42bfc61b
|
|
When an error occurs parsing an LDAP URL, The ludp->lud_attrs[i] entries
could be freed even though they sometimes point to data within an
allocated area.
This change introduces a lud_attrs_dup[] array for the duplicated string
pointers, and it removes the unused lud_exts array.
Bug: http://curl.haxx.se/mail/lib-2013-08/0209.html
|
|
|