Fix potential buffer overflow.
[dcpomatic.git] / src / tools / dcpomatic_kdm_cli.cc
index 5126e1954c10405b1929c2acf0a72e1b188afa11..65b98ee424dffea948573b578538a3c1518a4014 100644 (file)
@@ -83,7 +83,7 @@ duration_from_string (string d)
 {
        int N;
        char unit_buf[64] = "\0";
-       sscanf (d.c_str(), "%d %64s", &N, unit_buf);
+       sscanf (d.c_str(), "%d %63s", &N, unit_buf);
        string const unit (unit_buf);
 
        if (N == 0) {