date: recognize bogus FreeBSD gmtime output
[gitweb.git] / revision.c
index cf620c6b3693e2d18b2cacd33574a03b34e4c48e..9df13ca86000d9399a9493024751f93a17c51831 100644 (file)
@@ -1276,7 +1276,8 @@ static void read_revisions_from_stdin(struct rev_info *revs,
                        }
                        die("options not supported in --stdin mode");
                }
-               if (handle_revision_arg(sb.buf, revs, 0, REVARG_CANNOT_BE_FILENAME))
+               if (handle_revision_arg(xstrdup(sb.buf), revs, 0,
+                                       REVARG_CANNOT_BE_FILENAME))
                        die("bad revision '%s'", sb.buf);
        }
        if (seen_dashdash)