]> Dogcows Code - chaz/openbox/commitdiff
dont get a null at the end of the data, so use strndup
authorDana Jansens <danakj@orodu.net>
Mon, 14 Apr 2003 22:42:10 +0000 (22:42 +0000)
committerDana Jansens <danakj@orodu.net>
Mon, 14 Apr 2003 22:42:10 +0000 (22:42 +0000)
openbox/prop.c

index 27941ac32c3e19b6d0fadc31c290f7051d3d8bcb..a97b66dc3748fc5831790a6773bcb7397c722241 100644 (file)
@@ -303,7 +303,7 @@ gboolean prop_get_string_utf8(Window win, Atom prop, char **ret)
     guint num;
      
     if (get_all(win, prop, prop_atoms.utf8, 8, (guchar**)&raw, &num)) {
-       *ret = g_strdup(raw); /* grab the first string from the list */
+       *ret = g_strndup(raw, num); /* grab the first string from the list */
        g_free(raw);
        return TRUE;
     }
This page took 0.025086 seconds and 4 git commands to generate.