line-reader: Fix null derefe in line_reader_for_fd() with null encoding.
authorBen Pfaff <blp@cs.stanford.edu>
Fri, 4 Apr 2014 05:12:49 +0000 (22:12 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Fri, 4 Apr 2014 05:12:49 +0000 (22:12 -0700)
commit58fb13cdd772ad9f2e7088f2f524d40ab1efa896
tree61138eb6ceff56ae830113e20a63f2a779e9a4f4
parentb20b80bfeb88eca603cb5c10b5a7188387fd23fd
line-reader: Fix null derefe in line_reader_for_fd() with null encoding.

This function is supposed to treat NULL and "Auto" the same way, but it
tried to xstrdup NULL, which doesn't work.

This is easy to reproduce by attempting to use File|Import Data to read
a short file whose contents are all ASCII.

Bug #41971.
Reported by Mindaugus.
src/libpspp/line-reader.c