mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
fgetln may return incomplete lines (Tobias Stoeckmann <tobias@stoeckmann.org>)
simple solution: error out. This is not a correct cddb answer anyways.
This commit is contained in:
parent
4cc8d35577
commit
98f738e746
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: cddb.c,v 1.18 2014/01/04 15:39:17 tobias Exp $ */
|
||||
/* $OpenBSD: cddb.c,v 1.19 2014/01/06 12:38:10 espie Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2002 Marc Espie.
|
||||
*
|
||||
@ -212,6 +212,8 @@ get_line(FILE *cin)
|
||||
line[--len] = 0;
|
||||
if (len != 0 && line[len-1] == '\r')
|
||||
line[--len] = 0;
|
||||
if (line[len] != 0)
|
||||
return NULL;
|
||||
return line;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user