On Thu, Apr 10, 2014 at 03:17:20PM +0200, Lukas Nykryn wrote:
> ---
>  src/shared/fileio.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/shared/fileio.c b/src/shared/fileio.c
> index f101269..0eb131d 100644
> --- a/src/shared/fileio.c
> +++ b/src/shared/fileio.c
> @@ -446,11 +446,12 @@ static int parse_env_file_internal(
>                          state = SINGLE_QUOTE_VALUE;
>  
>                          if (!strchr(newline, c)) {
> -                                if (!greedy_realloc((void**) &value, 
> &value_alloc, n_value+2)) {
> +                                if (!greedy_realloc((void**) &value, 
> &value_alloc, n_value+3)) {
>                                          r = -ENOMEM;
>                                          goto fail;
>                                  }
>  
> +                                value[n_value++] = '\\';
>                                  value[n_value++] = c;
Can you please add a unit test for this?

Zbyszek
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to