summaryrefslogtreecommitdiffstats
path: root/abs/extra/afpfs-ng/20-build-error-fixes.patch
blob: 303e2646c3bb95601c826e8ee41d51a68d259278 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
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))