]> granicus.if.org Git - curl/commit
base64: fix Curl_base64_encode and Curl_base64_decode interfaces
authorYang Tse <yangsita@gmail.com>
Wed, 24 Aug 2011 06:07:36 +0000 (08:07 +0200)
committerYang Tse <yangsita@gmail.com>
Wed, 24 Aug 2011 06:10:30 +0000 (08:10 +0200)
commitfd00b382b2d33ef90c6f5c840a32b66c8ceb1662
treee95c73f96e5b4e67059326823e68ce78fc6f300b
parentcce6508242ab73cca896788ad9f968b89e5f9f3a
base64: fix Curl_base64_encode and Curl_base64_decode interfaces

Previous interfaces for these libcurl internal functions did not allow to tell
apart a legitimate zero size result from an error condition. These functions
now return a CURLcode indicating function success or otherwise specific error.
Output size is returned using a pointer argument.

All usage of these two functions, and others closely related, has been adapted
to the new interfaces. Relative error and OOM handling adapted or added where
missing. Unit test 1302 also adapted.
18 files changed:
lib/base64.c
lib/curl_base64.h
lib/curl_ntlm.c
lib/http.c
lib/http_digest.c
lib/http_negotiate.c
lib/http_negotiate_sspi.c
lib/http_ntlm.c
lib/krb4.c
lib/krb5.c
lib/ldap.c
lib/openldap.c
lib/security.c
lib/smtp.c
lib/warnless.c
lib/warnless.h
tests/server/getpart.c
tests/unit/unit1302.c