diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2001-10-29 11:48:19 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2001-10-29 11:48:19 +0000 |
commit | 635ef72a94db9f647dcff11d33f50115564ce091 (patch) | |
tree | e191d3b8f775e6332d9dc46ea0cfcc12cdd48746 /nanoftp.c | |
parent | 510953175566bbe17474e570d29e5437e2003ed2 (diff) | |
download | libxml2-635ef72a94db9f647dcff11d33f50115564ce091.tar.gz |
apply fixes to close #63271 and avoid segfaults when the error routine
* parser.c globals.c DOCBparser.c HTMLparser.c error.c:
apply fixes to close #63271 and avoid segfaults when
the error routine gets callbed before xmlInitParser()
get called.
* nanoftp.c error.c: Applied patches from Justin Fletcher
correcting some xmlGenericError misuses.
Daniel
Diffstat (limited to 'nanoftp.c')
-rw-r--r-- | nanoftp.c | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -756,7 +756,7 @@ xmlNanoFTPSendUser(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) return(res); @@ -781,7 +781,7 @@ xmlNanoFTPSendPasswd(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) return(res); @@ -808,7 +808,7 @@ xmlNanoFTPQuit(void *ctx) { sprintf(buf, "QUIT\r\n"); len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); /* Just to be consistent, even though we know it can't have a % in it */ #endif res = send(ctxt->controlFd, buf, len, 0); return(0); @@ -930,7 +930,7 @@ xmlNanoFTPConnect(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -951,7 +951,7 @@ xmlNanoFTPConnect(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -991,7 +991,7 @@ xmlNanoFTPConnect(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -1021,7 +1021,7 @@ xmlNanoFTPConnect(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -1042,7 +1042,7 @@ xmlNanoFTPConnect(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -1180,7 +1180,7 @@ xmlNanoFTPCwd(void *ctx, char *directory) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) return(res); @@ -1230,7 +1230,7 @@ xmlNanoFTPGetConnection(void *ctx) { sprintf(buf, "PASV\r\n"); len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -1296,7 +1296,7 @@ xmlNanoFTPGetConnection(void *ctx) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); @@ -1530,7 +1530,7 @@ xmlNanoFTPList(void *ctx, ftpListCallback callback, void *userData, buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -1624,7 +1624,7 @@ xmlNanoFTPGetSocket(void *ctx, const char *filename) { sprintf(buf, "TYPE I\r\n"); len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { @@ -1643,7 +1643,7 @@ xmlNanoFTPGetSocket(void *ctx, const char *filename) { buf[sizeof(buf) - 1] = 0; len = strlen(buf); #ifdef DEBUG_FTP - xmlGenericError(xmlGenericErrorContext, buf); + xmlGenericError(xmlGenericErrorContext, "%s", buf); #endif res = send(ctxt->controlFd, buf, len, 0); if (res < 0) { |