Changeset 22 for trunk/src/sh_html.c
- Timestamp:
- Feb 23, 2006, 12:03:58 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_html.c
r1 r22 296 296 { 297 297 entry_orig = realloc(entry_orig, /* free() ok */ 298 entry_size + line_size );298 entry_size + line_size + 1); 299 299 if (entry_orig) { add_size = line_size; } 300 300 } … … 302 302 { 303 303 entry_orig = malloc(line_size + 1); /* free() ok */ 304 if (entry_orig) { entry_orig[0] = '\0'; add_size = line_size + 1; }304 if (entry_orig) { entry_orig[0] = '\0'; add_size = line_size; } 305 305 } 306 306 if (!entry_orig) … … 311 311 } 312 312 313 s trcat(&entry_orig[entry_size], line); /* known to fit */313 sl_strlcat(&entry_orig[entry_size], line, line_size + 1); 314 314 entry_size += add_size; 315 SH_VAL_EQ(entry_orig[entry_size], '\0'); 315 316 } 316 317 sl_close(fd);
Note:
See TracChangeset
for help on using the changeset viewer.