xi18n_objects_list[lc_count].im_register = strdup_and_prefix(args[3]); xi18n_objects_list[lc_count].im_unregister = strdup_and_prefix(args[4]);
xi18n_objects_list[lc_count].im_register = strdup(args[3]); xi18n_objects_list[lc_count].im_unregister = strdup(args[4]);
resolve_object(path, lc_name)char *path;char *lc_name;{    char filename[BUFSIZ];    FILE *fp;    char buf[BUFSIZ];    if (lc_len == 0) { /* True only for the 1st time */      lc_len = OBJECT_INIT_LEN;      xi18n_objects_list = (XI18NObjectsList)	  Xmalloc(sizeof(XI18NObjectsListRec) * lc_len);      if (!xi18n_objects_list) return;    }/*1266793Limit the length of path to prevent stack buffer corruption.    sprintf(filename, "%s/%s", path, "XI18N_OBJS");*/    sprintf(filename, "%.*s/%s", BUFSIZ - 12, path, "XI18N_OBJS");    fp = fopen(filename, "r");    if (fp == (FILE *)NULL){	return;    }    while (fgets(buf, BUFSIZ, fp) != NULL){	char *p = buf;	int n;	char *args[6];	while (isspace(*p)){	    ++p;	}	if (iscomment(*p)){	    continue;	}	if (lc_count == lc_len) {	  lc_len += OBJECT_INC_LEN;	  xi18n_objects_list = (XI18NObjectsList)	    Xrealloc(xi18n_objects_list,		     sizeof(XI18NObjectsListRec) * lc_len);	  if (!xi18n_objects_list) return;	}	n = parse_line(p, args, 6);		if (n == 3 || n == 5) {	  if (!strcmp(args[0], "XLC")){	    xi18n_objects_list[lc_count].type = XLC_OBJECT;	  } else if (!strcmp(args[0], "XOM")){	    xi18n_objects_list[lc_count].type = XOM_OBJECT;	  } else if (!strcmp(args[0], "XIM")){	    xi18n_objects_list[lc_count].type = XIM_OBJECT;	  }	  xi18n_objects_list[lc_count].dl_name = strdup(args[1]);	  xi18n_objects_list[lc_count].open = strdup_and_prefix(args[2]);	  xi18n_objects_list[lc_count].dl_release = XI18N_DLREL;	  xi18n_objects_list[lc_count].locale_name = strdup(lc_name);	  xi18n_objects_list[lc_count].dl_module = (void*)NULL;	  if (n == 5) {	    xi18n_objects_list[lc_count].im_register = strdup_and_prefix(args[3]);	    xi18n_objects_list[lc_count].im_unregister = strdup_and_prefix(args[4]);	  } else {	    xi18n_objects_list[lc_count].im_register = NULL;	    xi18n_objects_list[lc_count].im_unregister = NULL;	  }	  lc_count++;	}    }    fclose(fp);}