encoding-guesser: Avoid reading uninitialized data for zero-length files.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 5 Oct 2021 15:47:46 +0000 (08:47 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 5 Oct 2021 15:47:46 +0000 (08:47 -0700)
commitdb8e899446fa2679235ce3091dc4eebe33429a99
tree936973838240a64538d8ba7cb014a46991a8c6c1
parent134b0f8bcfadd9d4ae051d665f30c3227fae1c75
encoding-guesser: Avoid reading uninitialized data for zero-length files.

Found while investigating bug #61254.
Thanks to Irfan Ariq for reporting this bug.
src/libpspp/encoding-guesser.c