Correct fscanf char field count
[deliverable/binutils-gdb.git] / binutils / readelf.c
index 3cf46d8b16be7a22610523e40c718ae93201f391..58ccd93929785b17e61750aa88683cfacfa7dcd0 100644 (file)
@@ -4394,7 +4394,7 @@ process_program_headers (FILE * file)
          else
            {
              char fmt [32];
-             int ret = snprintf (fmt, sizeof (fmt), "%%%ds", PATH_MAX);
+             int ret = snprintf (fmt, sizeof (fmt), "%%%ds", PATH_MAX - 1);
 
              if (ret >= (int) sizeof (fmt) || ret < 0)
                error (_("Internal error: failed to create format string to display program interpreter\n"));
This page took 0.028756 seconds and 4 git commands to generate.