lix/tests/unit
Lulu 51a5025913 Avoid calling memcpy when len == 0 in filetransfer.cc
There was a bug report about a potential call to `memcpy` with a null
pointer which is not reproducible:
#492

This occurred in `src/libstore/filetransfer.cc` in `InnerSource::read`.

To ensure that this doesn't happen, an early return is added before
calling `memcpy` if the length of the data to be copied is 0.

This change also adds a test that ensures that when `InnerSource::read`
is called with an empty file, it throws an `EndOfFile` exception.

Change-Id: Ia18149bee9a3488576c864f28475a3a0c9eadfbb
2024-10-08 01:26:30 +02:00
..
libcmd util.hh: Delete remaining file and clean up headers 2024-05-29 12:38:51 +02:00
libexpr libexpr: Deprecate URL literals 2024-08-17 20:31:57 +02:00
libexpr-support/tests libexpr: Introduce Deprecated features 2024-08-17 19:47:51 +02:00
libmain main: log stack traces for std::terminate 2024-09-25 14:03:45 -07:00
libstore Avoid calling memcpy when len == 0 in filetransfer.cc 2024-10-08 01:26:30 +02:00
libstore-support/tests Test including relative paths in configuration 2024-09-01 15:52:48 -07:00
libutil libutil: add async collection mechanism 2024-09-26 16:56:08 +00:00
libutil-support/tests Test including relative paths in configuration 2024-09-01 15:52:48 -07:00
meson.build Merge "libutil: add async collection mechanism" into main 2024-09-26 17:23:52 +00:00