- Timestamp:
- Feb 4, 2011, 3:49:44 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.8, release-1.9
- Children:
- dfe5829
- Parents:
- 65c753e
- git-author:
- David Benjamin <davidben@mit.edu> (01/24/11 17:55:19)
- git-committer:
- David Benjamin <davidben@mit.edu> (02/04/11 15:49:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zephyr.c
r5fca55f rfc7481a 480 480 { 481 481 int i, count, save; 482 char *out;483 482 484 483 /* If there's no message here, just run along now */ … … 500 499 /* catch the last field, which might not be null terminated */ 501 500 if (count==j-1) { 502 out=owl_malloc(n->z_message_len-save+5); 503 memcpy(out, n->z_message+save, n->z_message_len-save); 504 out[n->z_message_len-save]='\0'; 505 return(out); 501 return g_strndup(n->z_message + save, n->z_message_len - save); 506 502 } 507 503 … … 532 528 if (count == j - 1) { 533 529 char *tmp, *out; 534 tmp = owl_malloc(n->z_message_len-save+5); 535 memcpy(tmp, n->z_message+save, n->z_message_len-save); 536 tmp[n->z_message_len-save]='\0'; 530 tmp = g_strndup(n->z_message + save, n->z_message_len - save); 537 531 out = owl_validate_or_convert(tmp); 538 532 owl_free(tmp);
Note: See TracChangeset
for help on using the changeset viewer.