Deleted Added
full compact
openpam_readline.c (236099) openpam_readline.c (247809)
1/*-
2 * Copyright (c) 2003 Networks Associates Technology, Inc.
3 * Copyright (c) 2004-2011 Dag-Erling Sm��rgrav
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by ThinkSec AS and
7 * Network Associates Laboratories, the Security Research Division of
8 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035

--- 48 unchanged lines hidden (view full) ---

57
58char *
59openpam_readline(FILE *f, int *lineno, size_t *lenp)
60{
61 char *line;
62 size_t len, size;
63 int ch;
64
1/*-
2 * Copyright (c) 2003 Networks Associates Technology, Inc.
3 * Copyright (c) 2004-2011 Dag-Erling Sm��rgrav
4 * All rights reserved.
5 *
6 * This software was developed for the FreeBSD Project by ThinkSec AS and
7 * Network Associates Laboratories, the Security Research Division of
8 * Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035

--- 48 unchanged lines hidden (view full) ---

57
58char *
59openpam_readline(FILE *f, int *lineno, size_t *lenp)
60{
61 char *line;
62 size_t len, size;
63 int ch;
64
65 if ((line = malloc(size = MIN_LINE_LENGTH)) == NULL) {
66 openpam_log(PAM_LOG_ERROR, "malloc(): %m");
65 line = NULL;
66 if (openpam_straddch(&line, &size, &len, 0) != 0)
67 return (NULL);
67 return (NULL);
68 }
69 len = 0;
70 for (;;) {
71 ch = fgetc(f);
72 /* strip comment */
73 if (ch == '#') {
74 do {
75 ch = fgetc(f);
76 } while (ch != EOF && ch != '\n');
77 }

--- 63 unchanged lines hidden ---
68 for (;;) {
69 ch = fgetc(f);
70 /* strip comment */
71 if (ch == '#') {
72 do {
73 ch = fgetc(f);
74 } while (ch != EOF && ch != '\n');
75 }

--- 63 unchanged lines hidden ---