[Pkg-running-devel] [antpm] 03/20: gant: replace strcpy with strncpy

Kristof Ralovich ralovich-guest at moszumanska.debian.org
Sun Jun 28 12:26:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

ralovich-guest pushed a commit to branch upstream
in repository antpm.

commit f29a83fcc06c4f782c563235aee4bb525f7d914c
Author: RALOVICH, Kristof <tade60 at freemail.hu>
Date:   Sun May 31 18:09:27 2015 +0200

    gant: replace strcpy with strncpy
---
 src/gant/gant.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gant/gant.c b/src/gant/gant.c
index 1c4cca6..5586f99 100644
--- a/src/gant/gant.c
+++ b/src/gant/gant.c
@@ -1182,7 +1182,7 @@ uchar chevent(uchar chan, uchar event)
         bzero(pair.devname, sizeof pair.devname);
         /* if (peerdev <= 9999999) // only allow 7 digits */
         /* sprintf(pair.devname, "%u", peerdev); */
-        strcpy(pair.devname, fname);
+        strncpy(pair.devname, fname, sizeof(pair.devname)-1);
         /* else */
         /*        DEBUG_OUT(1, "Pair dev name too large %08x \"%d\"\n", peerdev, peerdev) */
         pair.u1 = strlen(pair.devname);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-running/antpm.git



More information about the Pkg-running-devel mailing list