[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 271/282: silly web server: silent a compilation warning
From: |
gnunet |
Subject: |
[gnurl] 271/282: silly web server: silent a compilation warning |
Date: |
Wed, 01 Apr 2020 14:32:16 +0200 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 77336671dc4d036bc36c135afba47ea52b1b6663
Author: Patrick Monnerat <address@hidden>
AuthorDate: Tue Jan 28 11:56:41 2020 +0100
silly web server: silent a compilation warning
Recent gcc warns when byte count of strncpy() equals the destination
buffer size. Since the destination buffer is previously cleared and
the source string is always shorter, reducing the byte count by one
silents the warning without affecting the result.
Closes #5059
---
tests/server/sws.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/server/sws.c b/tests/server/sws.c
index eed2d5fd9..b397ed19b 100644
--- a/tests/server/sws.c
+++ b/tests/server/sws.c
@@ -2163,7 +2163,7 @@ int main(int argc, char *argv[])
case AF_UNIX:
memset(&me.sau, 0, sizeof(me.sau));
me.sau.sun_family = AF_UNIX;
- strncpy(me.sau.sun_path, unix_socket, sizeof(me.sau.sun_path));
+ strncpy(me.sau.sun_path, unix_socket, sizeof(me.sau.sun_path) - 1);
rc = bind(sock, &me.sa, sizeof(me.sau));
if(0 != rc && errno == EADDRINUSE) {
struct stat statbuf;
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] 238/282: tests: wrap ignored test failures in braces, (continued)
- [gnurl] 238/282: tests: wrap ignored test failures in braces, gnunet, 2020/04/01
- [gnurl] 255/282: seek: fix fallback for missing ftruncate on Windows, gnunet, 2020/04/01
- [gnurl] 251/282: libssh: Fix matching user-specified MD5 hex key, gnunet, 2020/04/01
- [gnurl] 256/282: tool_cb_see: set correct copyright year range, gnunet, 2020/04/01
- [gnurl] 254/282: config-win32: Windows does not have ftruncate, gnunet, 2020/04/01
- [gnurl] 262/282: runtests: fix missing use of exe_ext helper function, gnunet, 2020/04/01
- [gnurl] 261/282: ares: store dns parameters for duphandle, gnunet, 2020/04/01
- [gnurl] 266/282: lib1564: reduce number of mid-wait wakeup calls, gnunet, 2020/04/01
- [gnurl] 260/282: version: make curl_version* thread-safe without using global context, gnunet, 2020/04/01
- [gnurl] 269/282: test 1560: avoid valgrind false positives, gnunet, 2020/04/01
- [gnurl] 271/282: silly web server: silent a compilation warning,
gnunet <=
- [gnurl] 272/282: socks4: fix host resolve regression, gnunet, 2020/04/01
- [gnurl] 263/282: mime: latch last read callback status., gnunet, 2020/04/01
- [gnurl] 246/282: multi: skip EINTR check on wakeup socket if it was closed, gnunet, 2020/04/01
- [gnurl] 253/282: pause: force a connection (re-)check after unpausing, gnunet, 2020/04/01
- [gnurl] 273/282: RELEASE-NOTES: synced, gnunet, 2020/04/01
- [gnurl] 267/282: sha256: Added SecureTransport implementation, gnunet, 2020/04/01
- [gnurl] 265/282: mime: fix the binary encoder to handle large data properly, gnunet, 2020/04/01
- [gnurl] 275/282: runtests: log minimal and maximal used port numbers, gnunet, 2020/04/01
- [gnurl] 279/282: test1129: fix invalid case of closing XML-tag and Content-Length, gnunet, 2020/04/01
- [gnurl] 274/282: sftp: fix segfault regression introduced by #4747, gnunet, 2020/04/01