We should not pass an uninitialized len as *n.
At least on aix7 getline(*lineptr=NULL, *n=3622720148, ...)
returns -1 with errno=ENOMEM.
Created attachment 15053 [details]
Two patches: One pure bugfix, another one to initialize the other variables
Created attachment 15054 [details]
Implement metze's hint to take "len" out of the loop
Created attachment 15078 [details]
Patch for v4-10-test
(In reply to Stefan Metzmacher from comment #3)
Pushed to autobuild-v4-10-test.
Pushed to v4-10-test.
Closing out bug report.