diff -Naur oldaffix/affix-3.2.0/control/btftp.c newaffix/affix-3.2.0/control/btftp.c --- oldaffix/affix-3.2.0/control/btftp.c 2004-07-20 12:51:48.000000000 +0300 +++ newaffix/affix-3.2.0/control/btftp.c 2005-07-01 12:14:04.000000000 +0300 @@ -133,7 +133,6 @@ { char *next = (char*)buf, *elem, *attrs, *attr, *value; char *size = NULL, *name = NULL; - int count = 0; char str[80], perm[PERM_SIZE]; //printf("buf: %s\n", buf); return; @@ -146,7 +145,6 @@ if (strcmp(elem, "/folder-listing") == 0) break; size = NULL, name = NULL; - count = 0; //printf("element: %s\n", elem); //printf("attr left: %s\n", attrs); memset(perm, '-', PERM_SIZE); @@ -171,7 +169,7 @@ else if ( size == NULL && strcmp(attr, "size") == 0 ) size = value; } - count += sprintf(str+count, "%s\t\t%s\t\t%s", perm, + snprintf(str,sizeof(str), "%s\t\t%s\t\t%s", perm, size?size:"0", name?name:""); printf("%s\n", str); } diff -Naur oldaffix/affix-3.2.0/obex/btobex.c newaffix/affix-3.2.0/obex/btobex.c --- oldaffix/affix-3.2.0/obex/btobex.c 2004-03-24 21:00:24.000000000 +0200 +++ newaffix/affix-3.2.0/obex/btobex.c 2005-07-01 12:42:07.000000000 +0300 @@ -151,13 +151,19 @@ } else if (flags & 0x01) {// create empty object fd = open(name, O_CREAT, 0600); close(fd); - } else { - char cmd[PATH_MAX]; - sprintf(cmd, "/bin/mv \"%s\" \"%s\"", file, name); - fd = system(cmd); - if (fd) { - BTERROR("failed: system(\"%s\") = %d\n", cmd, fd); - } + } else { + int status; + pid_t pid; + + switch (pid = fork()) { + case -1: + BTERROR("Fork error!\n"); + return -1; + case 0: + execl("/bin/mv","/bin/mv",file,name,NULL); + default: + waitpid(pid,&status,0); + } } return 0; }