20-build-error-fixes.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. Tanım: Fix build errors.
  2. Origin: http://anonscm.debian.org/gitweb/?p=collab-maint/afpfs-ng.git;a=blob;f=debian/patches/build-error-fixes.patch
  3. --- a/lib/afp_url.c
  4. +++ b/lib/afp_url.c
  5. @@ -233,7 +233,7 @@
  6. }
  7. }
  8. - snprintf(url->servername,strlen(p)+1,p);
  9. + strcpy(url->servername,p);
  10. if (check_servername(url->servername)) {
  11. if (verbose) printf("This isn't a valid servername\n");
  12. return -1;
  13. @@ -263,7 +263,7 @@
  14. if ((q=escape_strrchr(p,':',":"))) {
  15. *q='\0';
  16. q++;
  17. - snprintf(url->password,strlen(q)+1,q);
  18. + strcpy(url->password,q);
  19. if (check_password(url->password)) {
  20. if (verbose) printf("This isn't a valid passwd\n");
  21. return -1;
  22. @@ -276,7 +276,7 @@
  23. if ((q=strstr(p,";AUTH="))) {
  24. *q='\0';
  25. q+=6;
  26. - snprintf(url->uamname,strlen(q)+1,q);
  27. + strcpy(url->uamname,q);
  28. if (check_uamname(url->uamname)) {
  29. if (verbose) printf("This isn't a valid uamname\n");
  30. return -1;
  31. @@ -284,7 +284,7 @@
  32. }
  33. if (strlen(p)>0) {
  34. - snprintf(url->username,strlen(p)+1,p);
  35. + strcpy(url->username,p);
  36. if (check_username(url->username)) {
  37. if (verbose) printf("This isn't a valid username\n");
  38. return -1;;
  39. @@ -304,12 +304,12 @@
  40. *q='\0';
  41. q++;
  42. }
  43. - snprintf(url->volumename,strlen(p)+1,p);
  44. + strcpy(url->volumename,p);
  45. if (q) {
  46. url->path[0]='/';
  47. - snprintf(url->path+1,strlen(q)+1,q);
  48. + strcpy(url->path+1,q);
  49. }
  50. done:
  51. --- a/fuse/commands.c
  52. +++ b/fuse/commands.c
  53. @@ -163,8 +163,7 @@
  54. if (c) {
  55. len = strlen(c->client_string);
  56. - snprintf(c->client_string+len,
  57. - MAX_CLIENT_RESPONSE-len,
  58. + strcpy(c->client_string+len,
  59. message);
  60. } else {
  61. @@ -468,7 +467,7 @@
  62. volume->mapping=req->map;
  63. afp_detect_mapping(volume);
  64. - snprintf(volume->mountpoint,255,req->mountpoint);
  65. + strcpy(volume->mountpoint,req->mountpoint);
  66. /* Create the new thread and block until we get an answer back */
  67. {
  68. --- a/fuse/client.c
  69. +++ b/fuse/client.c
  70. @@ -547,7 +547,7 @@
  71. done:
  72. memset(toprint,0,MAX_CLIENT_RESPONSE+200);
  73. snprintf(toprint,MAX_CLIENT_RESPONSE+200,"%s",incoming_buffer+sizeof(*answer));
  74. - printf(toprint);
  75. + printf("%s",toprint);
  76. return ((struct afp_server_response *) incoming_buffer)->result;
  77. return 0;
  78. --- a/cmdline/cmdline_afp.c
  79. +++ b/cmdline/cmdline_afp.c
  80. @@ -828,11 +828,11 @@
  81. char text[40960];
  82. afp_status_header(text,&len);
  83. - printf(text);
  84. + printf("%s",text);
  85. len=40960;
  86. afp_status_server(server,text,&len);
  87. - printf(text);
  88. + printf("%s",text);
  89. return 0;
  90. }
  91. --- a/cmdline/cmdline_testafp.c
  92. +++ b/cmdline/cmdline_testafp.c
  93. @@ -26,12 +26,12 @@
  94. struct afp_url valid_url;
  95. afp_default_url(&valid_url);
  96. valid_url.protocol=protocol;
  97. - sprintf(valid_url.servername,servername);
  98. - sprintf(valid_url.volumename,volumename);
  99. - sprintf(valid_url.path,path);
  100. - sprintf(valid_url.username,username);
  101. - sprintf(valid_url.password,password);
  102. - sprintf(valid_url.uamname,uamname);
  103. + strcpy(valid_url.servername,servername);
  104. + strcpy(valid_url.volumename,volumename);
  105. + strcpy(valid_url.path,path);
  106. + strcpy(valid_url.username,username);
  107. + strcpy(valid_url.password,password);
  108. + strcpy(valid_url.uamname,uamname);
  109. valid_url.port=port;
  110. if (afp_url_validate(url_string,&valid_url))