Skip to content

Commit 7faf450

Browse files
committed
Make sure only 10 lines or less are read. Thanx to Stuart Robertson for noticing
git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/sandbox/csv/trunk@526450 13f79535-47bb-0310-9956-ffa450edef68
1 parent 20d3ec4 commit 7faf450

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/java/org/apache/commons/csv/writer/CSVConfigGuesser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public CSVConfig guess() {
8080
String[] lines = new String[10];
8181
String line = null;
8282
int counter = 0;
83-
while ( (line = bIn.readLine()) != null || counter > 10) {
83+
while ( (line = bIn.readLine()) != null && counter <= 10) {
8484
lines[counter] = line;
8585
counter++;
8686
}

0 commit comments

Comments
 (0)