artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4cc8d35
)
fgetln may return incomplete lines (Tobias Stoeckmann <tobias@stoeckmann.org>)
author
espie
<espie@openbsd.org>
Mon, 6 Jan 2014 12:38:10 +0000
(12:38 +0000)
committer
espie
<espie@openbsd.org>
Mon, 6 Jan 2014 12:38:10 +0000
(12:38 +0000)
simple solution: error out. This is not a correct cddb answer anyways.
usr.bin/cdio/cddb.c
patch
|
blob
|
history
diff --git
a/usr.bin/cdio/cddb.c
b/usr.bin/cdio/cddb.c
index
722cb8d
..
bc3e010
100644
(file)
--- a/
usr.bin/cdio/cddb.c
+++ b/
usr.bin/cdio/cddb.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: cddb.c,v 1.1
8 2014/01/04 15:39:17 tobias
Exp $ */
+/* $OpenBSD: cddb.c,v 1.1
9 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;
}