• Thomas Haller's avatar
    dns: fix creating resolv.conf content · 511709c5
    Thomas Haller authored
    g_string_new_len() allocates the buffer with length
    bytes. Maybe it should be obvious (wasn't to me), but
    if a init argument is given, that is taken as containing
    length bytes.
    
    So,
    
        str = g_string_new_len (init, len);
    
    is more like
    
        str = g_string_new_len (NULL, len);
        g_string_append_len (str, init, len);
    
    and not (how I wrongly thought)
    
        str = g_string_new_len (NULL, len);
        g_string_append (str, init);
    
    Fixes: 95b006c2
    511709c5
nm-dns-manager.c 70.2 KB