Changeset 3120 in MondoRescue for branches/3.0
- Timestamp:
- May 15, 2013, 2:52:16 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/libmondo-filelist.c
r3060 r3120 210 210 char *outfname = NULL; 211 211 char *biggie_fname = NULL; 212 char *incoming ;212 char *incoming = NULL; 213 213 char *tmp = NULL; 214 214 char *p = NULL; … … 258 258 return (curr_set_no + 1); 259 259 } 260 incoming = malloc(MAX_STR_LEN * 2); 261 262 p = fgets(incoming, MAX_STR_LEN * 2 - 1, fin); 263 while (!feof(fin) && (p != NULL)) { 260 261 mr_getline(incoming, fin); 262 while (!feof(fin)) { 264 263 lino++; 265 264 i = strlen(incoming) - 1; 266 265 if (i < 0) { 267 266 i = 0; 268 }269 if (i > MAX_STR_LEN - 1) {270 incoming[MAX_STR_LEN - 30] = '\0';271 log_msg(1, "Warning - truncating file %s's name", incoming);272 err++;273 267 } 274 268 if (incoming[i] < 32) { … … 302 296 mr_free(outfname); 303 297 mr_free(biggie_fname); 304 paranoid_free(incoming);298 mr_free(incoming); 305 299 return (curr_set_no + 1); 306 300 } … … 308 302 } 309 303 } 310 p = fgets(incoming, MAX_STR_LEN * 2 - 1, fin); 311 } 312 paranoid_free(incoming); 304 mr_free(incoming); 305 mr_getline(incoming, fin); 306 } 307 mr_free(incoming); 308 313 309 paranoid_fclose(fin); 314 310 paranoid_fclose(fout);
Note:
See TracChangeset
for help on using the changeset viewer.