[PATCH:xauth] Use copystring to create non-const string.

Thomas Klausner wiz at NetBSD.org
Sun Jun 30 04:29:44 PDT 2013


Fixes "error: assignment discards qualifiers from pointer target type"

Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
---
 process.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/process.c b/process.c
index 166b769..baac2cd 100644
--- a/process.c
+++ b/process.c
@@ -1892,7 +1892,7 @@ do_generate(const char *inputfilename, int lineno, int argc, const char **argv)
 	 auth_in->name = DEFAULT_PROTOCOL;
     }
     else
-	auth_in->name = protoname;
+	auth_in->name = copystring (protoname, strlen(protoname));
     auth_in->name_length = strlen(auth_in->name);
     auth_in->data = authdata;
     auth_in->data_length = authdatalen;
-- 
1.8.3.1



More information about the xorg-devel mailing list