From 0e3496a1551d3b0947f8fd20cd78275ab81278ed Mon Sep 17 00:00:00 2001 From: Gaetan Nadon Date: Wed, 9 Jun 2010 13:56:28 -0400 Subject: Use strncpy rather than strlcpy as it is not available on Linux Because it is available on other platforms, it only fails on Linux. strncpy should be safe enough in this situation where a constant is copied. The xserver private impl of strlcpy is not available to apps. Reviewed-by: Alan Coopersmith Signed-off-by: Gaetan Nadon --- scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index e33c9d9..758fd19 100644 --- a/scope.c +++ b/scope.c @@ -337,7 +337,7 @@ ReadCommands (void) printf ("> "); if (!fgets (line, sizeof line, stdin)) { if(feof(stdin)) { - strlcpy(line, "quit", sizeof(line)); + strncpy(line, "quit", sizeof(line)); } else { printf("Error: %s\n", strerror(errno)); break; -- cgit v1.2.1