Skip to content
  • Michael Natterer's avatar
    use g_strndup() instead of g_strdup() if a length was passed. · 20ac70e7
    Michael Natterer authored
    2004-11-22  Michael Natterer  <mitch@gimp.org>
    
    	* libgimpbase/gimputils.c (gimp_any_to_utf8): use g_strndup()
    	instead of g_strdup() if a length was passed.
    
    	* app/dialogs/info-window.c: g_strndup() the comment parasite's
    	data and pass -1 as length to gimp_any_to_utf8() so we don't
    	encounter the questionable (buggy?) behavior of g_utf8_validate()
    	to fail upon finding '\0' within the "length" passed.
    	Fixes bug #159051.
    20ac70e7