Ludovic Courtès 46b8aadbd6 serialization: Check for EOF and incomplete input conditions.
Fixes <http://bugs.gnu.org/19756>.
Reported by <sleep_walker@suse.cz>.

* guix/serialization.scm (currently-restored-file): New variable.
  (get-bytevector-n*): New procedure.
  (read-int, read-long-long, read-string, read-latin1-string,
  read-contents): Use it instead of 'get-bytevector-n'.
  (restore-file): Parameterize 'currently-restored-file' and set it.
* tests/nar.scm ("restore-file with incomplete input"): New test.
2015-02-07 23:16:55 +01:00
..
2013-07-01 23:28:21 +02:00
2015-01-09 10:38:26 -06:00
2014-02-21 23:49:52 +01:00
2015-01-17 23:45:48 +01:00
2014-03-31 23:34:20 +02:00
2015-01-11 23:50:01 +01:00
2014-09-29 19:30:28 -04:00