]> granicus.if.org Git - sysstat/commitdiff
Use strncpy instead of strcpy in ioconf.c
authorPeter Schiffer <pschiffe@redhat.com>
Tue, 5 May 2015 13:55:47 +0000 (15:55 +0200)
committerPeter Schiffer <pschiffe@redhat.com>
Tue, 5 May 2015 13:55:47 +0000 (15:55 +0200)
ioconf.c

index 8f7fb25577cee102fe6fc7150dda78e47764783e..bc9094e7dcc3695b3a52de1e38d13a7855e120b8 100644 (file)
--- a/ioconf.c
+++ b/ioconf.c
@@ -316,7 +316,7 @@ int ioc_init(void)
                        break;
 
                case '%':
-                       strcpy(blkp->dfmt, dfmt + 1);
+                       strncpy(blkp->dfmt, dfmt + 1, IOC_FMTLEN);
                case 'd':
                        blkp->cconv = ioc_ito10;
                        strcat(blkp->dfmt, "%s");