The use of strndup was actually unsafe, as the length was passed using
an ordinary strlen. strndup was not availableon OS X 10.6, and is now
replaced by an ordinary strdup, which should be save enough.
char *cp;
/* make a copy of the filter string, so that strtok can work with it*/
char *cp;
/* make a copy of the filter string, so that strtok can work with it*/
- cp = strndup(filter,strlen(filter));
/* add filters for file extensions */
gtkfilter = gtk_file_filter_new();
/* add filters for file extensions */
gtkfilter = gtk_file_filter_new();