milis/talimatname/genel/a/afpfs-ng/20-build-error-fixes.patch

126 lines
3.1 KiB
Diff
Raw Normal View History

2017-06-29 13:16:57 +02:00
Description: Fix build errors.
Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/afpfs-ng.git;a=blob;f=debian/patches/build-error-fixes.patch
--- a/lib/afp_url.c
+++ b/lib/afp_url.c
@@ -233,7 +233,7 @@
}
}
- snprintf(url->servername,strlen(p)+1,p);
+ strcpy(url->servername,p);
if (check_servername(url->servername)) {
if (verbose) printf("This isn't a valid servername\n");
return -1;
@@ -263,7 +263,7 @@
if ((q=escape_strrchr(p,':',":"))) {
*q='\0';
q++;
- snprintf(url->password,strlen(q)+1,q);
+ strcpy(url->password,q);
if (check_password(url->password)) {
if (verbose) printf("This isn't a valid passwd\n");
return -1;
@@ -276,7 +276,7 @@
if ((q=strstr(p,";AUTH="))) {
*q='\0';
q+=6;
- snprintf(url->uamname,strlen(q)+1,q);
+ strcpy(url->uamname,q);
if (check_uamname(url->uamname)) {
if (verbose) printf("This isn't a valid uamname\n");
return -1;
@@ -284,7 +284,7 @@
}
if (strlen(p)>0) {
- snprintf(url->username,strlen(p)+1,p);
+ strcpy(url->username,p);
if (check_username(url->username)) {
if (verbose) printf("This isn't a valid username\n");
return -1;;
@@ -304,12 +304,12 @@
*q='\0';
q++;
}
- snprintf(url->volumename,strlen(p)+1,p);
+ strcpy(url->volumename,p);
if (q) {
url->path[0]='/';
- snprintf(url->path+1,strlen(q)+1,q);
+ strcpy(url->path+1,q);
}
done:
--- a/fuse/commands.c
+++ b/fuse/commands.c
@@ -163,8 +163,7 @@
if (c) {
len = strlen(c->client_string);
- snprintf(c->client_string+len,
- MAX_CLIENT_RESPONSE-len,
+ strcpy(c->client_string+len,
message);
} else {
@@ -468,7 +467,7 @@
volume->mapping=req->map;
afp_detect_mapping(volume);
- snprintf(volume->mountpoint,255,req->mountpoint);
+ strcpy(volume->mountpoint,req->mountpoint);
/* Create the new thread and block until we get an answer back */
{
--- a/fuse/client.c
+++ b/fuse/client.c
@@ -547,7 +547,7 @@
done:
memset(toprint,0,MAX_CLIENT_RESPONSE+200);
snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer));
- printf(toprint);
+ printf("%s",toprint);
return ((struct afp_server_response *) incoming_buffer)->result;
return 0;
--- a/cmdline/cmdline_afp.c
+++ b/cmdline/cmdline_afp.c
@@ -828,11 +828,11 @@
char text[40960];
afp_status_header(text,&len);
- printf(text);
+ printf("%s",text);
len=40960;
afp_status_server(server,text,&len);
- printf(text);
+ printf("%s",text);
return 0;
}
--- a/cmdline/cmdline_testafp.c
+++ b/cmdline/cmdline_testafp.c
@@ -26,12 +26,12 @@
struct afp_url valid_url;
afp_default_url(&valid_url);
valid_url.protocol=protocol;
- sprintf(valid_url.servername,servername);
- sprintf(valid_url.volumename,volumename);
- sprintf(valid_url.path,path);
- sprintf(valid_url.username,username);
- sprintf(valid_url.password,password);
- sprintf(valid_url.uamname,uamname);
+ strcpy(valid_url.servername,servername);
+ strcpy(valid_url.volumename,volumename);
+ strcpy(valid_url.path,path);
+ strcpy(valid_url.username,username);
+ strcpy(valid_url.password,password);
+ strcpy(valid_url.uamname,uamname);
valid_url.port=port;
if (afp_url_validate(url_string,&valid_url))