Skip to content
  • Thomas Haller's avatar
    shared: use nm_strerror_native_r() in lower layers · d83d5f1d
    Thomas Haller authored
    Subsequent calls to nm_strerror_native() overwrite the previous
    buffer. That is potentially dangerious. At least functions in
    shared/nm-utils (which are lower-layer utilities) should not do
    that and instead use a stack-local buffer. That is because these
    functions should not make assumptions about the way they are called.
    
    On the other end, nmcli passing the return-value of nm_strerror_native()
    to g_print() is clearly OK because the higher layers are in control of
    when the call nm_strerror_native() -- by relying that lower layers don't
    interfere.
    d83d5f1d