Changeset 72
- Timestamp:
- Jan 30, 2006, 8:01:08 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gtk/conf.c
r51 r72 171 171 case G_IO_STATUS_NORMAL: 172 172 if(NULL != line) { 173 if(NULL != (sep = strchr(line, PREF_SEP_KEYVAL)) && sep > line) { 173 if(g_utf8_validate(line, len, NULL) && 174 NULL != (sep = strchr(line, PREF_SEP_KEYVAL)) && sep > line) { 174 175 *sep = '\0'; 175 176 line[termpos] = '\0'; … … 333 334 case G_IO_STATUS_NORMAL: 334 335 if(NULL != line) { 335 ts = g_new0(struct cf_torrentstate, 1); 336 ptr = line; 337 while(NULL != (ptr = getstateval(ts, ptr))) 338 ; 336 if(g_utf8_validate(line, -1, NULL)) { 337 ts = g_new0(struct cf_torrentstate, 1); 338 ptr = line; 339 while(NULL != (ptr = getstateval(ts, ptr))) 340 ; 341 if(NULL != ts->ts_torrent && NULL != ts->ts_directory) 342 ret = g_list_append(ret, ts); 343 else 344 cf_freestate(ts); 345 } 339 346 g_free(line); 340 if(NULL != ts->ts_torrent && NULL != ts->ts_directory)341 ret = g_list_append(ret, ts);342 else343 cf_freestate(ts);344 347 } 345 348 break; … … 438 441 io = g_io_channel_unix_new(fd); 439 442 g_io_channel_set_close_on_unref(io, TRUE); 440 441 /* XXX what the hell should I be doing about unicode? */442 443 443 444 err = NULL;
Note: See TracChangeset
for help on using the changeset viewer.