Bug 195922 - split(1) : wrong output with option -l and line length > MAXBSIZE
Summary: split(1) : wrong output with option -l and line length > MAXBSIZE
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 8.4-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-12 14:29 UTC by franz
Modified: 2014-12-12 14:29 UTC (History)
0 users

See Also:


Attachments
patch (1.25 KB, patch)
2014-12-12 14:29 UTC, franz
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description franz 2014-12-12 14:29:40 UTC
Created attachment 150506 [details]
patch

"split -l" gives a wrong output while line length ist greater MAXBSIZE (in my case 64k).
The "goto" in the source doesn't solve the problem. 
"newfile" has to be called with the first fgets buffer of a line. 

Mostly a good example for the error is to split the output of mysqldump (bigger tables).

I think in case of pattern matching ( split -p ) there has to be another coding (dynamic buffer for each line). But this not my turn.      


A suggestion of a patch ist attached.