]> Zhao Yanbai Git Server - minix.git/commitdiff
filter: resolve Coverity warnings
authorDavid van Moolenbroek <david@minix3.org>
Fri, 27 Jul 2012 14:52:23 +0000 (14:52 +0000)
committerDavid van Moolenbroek <david@minix3.org>
Mon, 30 Jul 2012 12:10:11 +0000 (12:10 +0000)
drivers/filter/driver.c

index d0b742ffebf2a0ec4e38b28aa1657ca694dc9d36..e5c16dcbe639bccd86adb639ce23d2a172a4af38 100644 (file)
@@ -393,7 +393,7 @@ static int check_problem(int which, int problem, int retries, int *tell_rs)
                        driver[DRIVER_MAIN] = driver[DRIVER_BACKUP];
 
                        /* This is not necessary. */
-                       strcpy(MAIN_LABEL, BACKUP_LABEL);
+                       strlcpy(MAIN_LABEL, BACKUP_LABEL, sizeof(MAIN_LABEL));
                        MAIN_MINOR = BACKUP_MINOR;
                }