30c872e LoadCredentials: do not assert on invalid syntax

1 file Authored by bluca 3 years ago, Committed by zbyszek 3 years ago,
    LoadCredentials: do not assert on invalid syntax
    
    LoadCredentials=foo causes an assertion to be triggered, as we
    are not checking that the rvalue's right hand side part is non-empty
    before using it in unit_full_printf.
    
    Fixes #19178
    
    # printf [Service]nLoadCredential=passwd.hashed-password.rootn > hello.service
    # systemd-analyze verify ./hello.service
    ...
    Assertion 'format' failed at src/core/unit-printf.c:232, function unit_full_printf(). Aborting.
    Aborted (core dumped)
    
        
file modified
+1 -1