]> granicus.if.org Git - sudo/commitdiff
Fix getline return value check.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Sep 2009 01:21:12 +0000 (01:21 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Fri, 18 Sep 2009 01:21:12 +0000 (01:21 +0000)
sudoreplay.c

index dc3e3a8b340a5635c66daf8221837b2b4fb017a5..5eaf70597898452f6f9bfc890600cd208a1523e9 100644 (file)
@@ -585,7 +585,7 @@ list_session_dir(pathbuf, re, user, tty)
         */
        if (getline(&buf, &bufsize, fp) == -1 ||
            getline(&cwd, &cwdsize, fp) == -1 ||
-           getline(&cmd, &cmdsize, fp)) {
+           getline(&cmd, &cmdsize, fp) == -1) {
            fclose(fp);
            continue;
        }