[configfile] fix reading uninitialized variable (found by Willian B.)
commitdef17b2925f5e8db74a7dbd93448726adac41e0c
authorStefan Bühler <stbuehler@web.de>
Sun, 19 Jul 2015 10:03:12 +0000 (19 10:03 +0000)
committerStefan Bühler <stbuehler@web.de>
Sun, 19 Jul 2015 10:03:12 +0000 (19 10:03 +0000)
tree46cdb291eea49bd5b469db1f42cd2dbad020e855
parent4a87f75fcf72746c8881fa49328aacdef89b9bd6
[configfile] fix reading uninitialized variable (found by Willian B.)

- stream_open()-ing an empty file shouldn't return an error (and didn't on my
  system)
- don't try to handle empty file as non-error in config_parse_file;
  this fixes the read of an potentially unitialized variable
- stream_open()-ing an empty file doesn't try to map the file anymore
  and should not result in any errors; return an empty stream instead.
- stream_open(): make sure the returned stream is always initialized
  correctly, and can always be used with stream_close(), whether opening
  was successful or not
- stream_close(): also reset the size member

From: Stefan Bühler <stbuehler@web.de>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3003 152afb58-edef-0310-8abb-c4023f1b3aa9
NEWS
src/configfile.c
src/stream.c