Changes in / [89f5338:5bc0f68]
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
aim.c
r9854278 r34509d5 948 948 949 949 if (modname) { 950 if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) {950 if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(modname)+4+1))) { 951 951 /* perror("memrequest: malloc"); */ 952 952 return -1; … … 954 954 sprintf(filename, "%s/%s.ocm", priv->aimbinarypath, modname); 955 955 } else { 956 if (!(filename = malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) {956 if (!(filename = owl_malloc(strlen(priv->aimbinarypath)+1+strlen(defaultmod)+1))) { 957 957 /* perror("memrequest: malloc"); */ 958 958 return -1; … … 964 964 if (!modname) { 965 965 /* perror("memrequest: stat"); */ 966 free(filename);966 owl_free(filename); 967 967 return -1; 968 968 } … … 986 986 int i; 987 987 988 free(filename); /* not needed */988 owl_free(filename); /* not needed */ 989 989 owl_function_error("getaimdata memrequest: recieved invalid request for 0x%08lx bytes at 0x%08lx (file %s)\n", len, offset, modname); 990 990 i = 8; … … 993 993 } 994 994 995 if (!(buf = malloc(i))) {995 if (!(buf = owl_malloc(i))) { 996 996 return -1; 997 997 } … … 1017 1017 *buflenret = i; 1018 1018 } else { 1019 if (!(buf = malloc(len))) {1020 free(filename);1019 if (!(buf = owl_malloc(len))) { 1020 owl_free(filename); 1021 1021 return -1; 1022 1022 } … … 1024 1024 if (!(f = fopen(filename, "r"))) { 1025 1025 /* perror("memrequest: fopen"); */ 1026 free(filename);1027 free(buf);1026 owl_free(filename); 1027 owl_free(buf); 1028 1028 return -1; 1029 1029 } 1030 1030 1031 free(filename);1031 owl_free(filename); 1032 1032 1033 1033 if (fseek(f, offset, SEEK_SET) == -1) { 1034 1034 /* perror("memrequest: fseek"); */ 1035 1035 fclose(f); 1036 free(buf);1036 owl_free(buf); 1037 1037 return -1; 1038 1038 } … … 1041 1041 /* perror("memrequest: fread"); */ 1042 1042 fclose(f); 1043 free(buf);1043 owl_free(buf); 1044 1044 return -1; 1045 1045 } … … 1076 1076 if (priv->aimbinarypath && (getaimdata(sess, &buf, &buflen, offset, len, modname) == 0)) { 1077 1077 aim_sendmemblock(sess, fr->conn, offset, buflen, buf, AIM_SENDMEMBLOCK_FLAG_ISREQUEST); 1078 free(buf);1078 owl_free(buf); 1079 1079 } else { 1080 1080 owl_function_debugmsg("faimtest_memrequest: unable to use AIM binary (\"%s/%s\"), sending defaults...\n", priv->aimbinarypath, modname); … … 1342 1342 int z; 1343 1343 1344 newbuf = malloc(i+1);1344 newbuf = owl_malloc(i+1); 1345 1345 for (z = 0; z < i; z++) 1346 1346 newbuf[z] = (z % 10)+0x30; 1347 1347 newbuf[i] = '\0'; 1348 1348 /* aim_send_im(sess, userinfo->sn, AIM_IMFLAGS_ACK | AIM_IMFLAGS_AWAY, newbuf); */ 1349 free(newbuf);1349 owl_free(newbuf); 1350 1350 } 1351 1351 } else if (strstr(tmpstr, "seticqstatus")) { -
cmd.c
r6922edd r34509d5 74 74 owl_cmd *cmd; 75 75 76 tmpbuff= strdup(cmdbuff);76 tmpbuff=owl_strdup(cmdbuff); 77 77 argv=owl_parseline(tmpbuff, &argc); 78 78 if (argc < 0) { -
configure.in
r18e28a4 r34509d5 12 12 fi 13 13 14 dnl m4_include(/usr/share/aclocal/pkg.m4) 15 m4_include(pkg.m4) 14 16 15 17 dnl Check for Athena … … 109 111 LDFLAGS=${LDFLAGS}\ ${FOO} 110 112 113 dnl Add CFLAGS and LDFLAGS for glib-2.0 114 PKG_CHECK_MODULES(GLIB,glib-2.0) 115 116 echo Adding glib-2.0 CFLAGS ${GLIB_CFLAGS} 117 CFLAGS=${CFLAGS}\ ${GLIB_CFLAGS} 118 echo Adding glib-2.0 LDFLAGS ${GLIB_LIBS} 119 LDFLAGS=${LDFLAGS}\ ${GLIB_LIBS} 120 121 111 122 dnl Checks for typedefs, structures, and compiler characteristics. 112 123 -
functions.c
r3939268 r34509d5 3023 3023 char *quoted; 3024 3024 3025 buff= malloc(strlen(class)+strlen(inst)+strlen(recip)+100);3025 buff=owl_malloc(strlen(class)+strlen(inst)+strlen(recip)+100); 3026 3026 strcpy(buff, "class"); 3027 3027 if (!strcmp(class, "*")) { … … 3327 3327 if (ret==0) { 3328 3328 for (x=0; x<numlocs; x++) { 3329 line= malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100);3329 line=owl_malloc(strlen(location[x].host)+strlen(location[x].time)+strlen(location[x].tty)+100); 3330 3330 tmp=short_zuser(user); 3331 3331 sprintf(line, " %-10.10s %-24.24s %-12.12s %20.20s\n", … … 3433 3433 _exit(127); 3434 3434 } 3435 parsed= realloc(parsed, sizeof(*parsed) * (myargc+1));3435 parsed=owl_realloc(parsed, sizeof(*parsed) * (myargc+1)); 3436 3436 parsed[myargc] = NULL; 3437 3437 -
global.c
rad15610 r34509d5 545 545 len+=strlen(argv[i])+5; 546 546 } 547 g->startupargs= malloc(len+5);547 g->startupargs=owl_malloc(len+5); 548 548 549 549 strcpy(g->startupargs, ""); -
message.c
r6711361 r34509d5 493 493 { 494 494 if(m->zwriteline) owl_free(m->zwriteline); 495 m->zwriteline= strdup(line);495 m->zwriteline=owl_strdup(line); 496 496 } 497 497 … … 890 890 } 891 891 892 m->zwriteline= strdup("");892 m->zwriteline=owl_strdup(""); 893 893 894 894 /* save the hostname */ … … 972 972 } 973 973 974 m->zwriteline= strdup("");974 m->zwriteline=owl_strdup(""); 975 975 976 976 owl_message_set_body(m, "<uninitialized>"); -
owl.c
r89f5338 r89f5338 48 48 #include <termios.h> 49 49 #include <sys/stat.h> 50 #include <locale.h> 50 51 #include "owl.h" 51 52 … … 92 93 debug=0; 93 94 initialsubs=1; 95 96 setlocale(LC_ALL, ""); 97 94 98 if (argc>0) { 95 99 argv++; -
owl.h
r18e28a4 r34509d5 53 53 #include <libfaim/aim.h> 54 54 #include "config.h" 55 #include "glib.h" 55 56 #ifdef HAVE_LIBZEPHYR 56 57 #include <zephyr/zephyr.h> -
text.c
r72db971 r34509d5 327 327 tolen = strlen(to); 328 328 fromlen = strlen(from); 329 out = malloc(outlen);329 out = owl_malloc(outlen); 330 330 331 331 while (in[inpos]) { -
util.c
r89f5338 r89f5338 446 446 void *owl_malloc(size_t size) 447 447 { 448 return( malloc(size));448 return(g_malloc(size)); 449 449 } 450 450 451 451 void owl_free(void *ptr) 452 452 { 453 free(ptr);453 g_free(ptr); 454 454 } 455 455 456 456 char *owl_strdup(const char *s1) 457 457 { 458 return( strdup(s1));458 return(g_strdup(s1)); 459 459 } 460 460 461 461 void *owl_realloc(void *ptr, size_t size) 462 462 { 463 return( realloc(ptr, size));463 return(g_realloc(ptr, size)); 464 464 } 465 465 -
zcrypt.c
r9ceee9d r34509d5 385 385 386 386 /* Build a space-separated string from argv from elements between start * 387 * and end - 1. malloc()'s the returned string. */387 * and end - 1. owl_malloc()'s the returned string. */ 388 388 char *BuildArgString(char **argv, int start, int end) { 389 389 int len = 1; … … 397 397 398 398 /* Allocate memory */ 399 result = (char *) malloc(len);399 result = (char *)owl_malloc(len); 400 400 if (result) { 401 401 /* Build the string */ … … 482 482 /* Prepare result to be returned */ 483 483 char *temp = keyfile; 484 keyfile = (char *) malloc(strlen(temp) + 1);484 keyfile = (char *)owl_malloc(strlen(temp) + 1); 485 485 if (keyfile) { 486 486 strcpy(keyfile, temp); … … 611 611 } 612 612 use_buffer = TRUE; 613 if ((inptr = inbuff = (char *) malloc(MAX_RESULT)) == NULL) {613 if ((inptr = inbuff = (char *)owl_malloc(MAX_RESULT)) == NULL) { 614 614 printf("Memory allocation error\n"); 615 615 return FALSE; … … 639 639 printf("Could not run zwrite\n"); 640 640 if (freein && inbuff) { 641 free(inbuff);641 owl_free(inbuff); 642 642 } 643 643 return(FALSE); … … 685 685 686 686 /* Free the input buffer, if necessary */ 687 if (freein && inbuff) free(inbuff);687 if (freein && inbuff) owl_free(inbuff); 688 688 689 689 return(!error); -
zwrite.c
r1fe100c r34509d5 95 95 z->message=owl_strdup(""); 96 96 while (myargc) { 97 z->message= realloc(z->message, strlen(z->message)+strlen(myargv[0])+5);97 z->message=owl_realloc(z->message, strlen(z->message)+strlen(myargv[0])+5); 98 98 strcat(z->message, myargv[0]); 99 99 strcat(z->message, " "); … … 113 113 } else { 114 114 /* anything unattached is a recipient */ 115 owl_list_append_element(&(z->recips), strdup(myargv[0]));115 owl_list_append_element(&(z->recips), owl_strdup(myargv[0])); 116 116 myargv++; 117 117 myargc--; … … 177 177 z->zsig=owl_strdup(zsigzvar); 178 178 } else if (((pw=getpwuid(getuid()))!=NULL) && (pw->pw_gecos)) { 179 z->zsig= strdup(pw->pw_gecos);179 z->zsig=owl_strdup(pw->pw_gecos); 180 180 ptr=strchr(z->zsig, ','); 181 181 if (ptr) {
Note: See TracChangeset
for help on using the changeset viewer.