diff -Naur oldaffix/affix-2.1.2/control/btctl-obex.c newaffix/affix-2.1.2/control/btctl-obex.c --- oldaffix/affix-2.1.2/control/btctl-obex.c 2003-04-15 13:47:06.000000000 +0300 +++ newaffix/affix-2.1.2/control/btctl-obex.c 2005-07-01 14:36:12.000000000 +0300 @@ -114,7 +114,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; @@ -127,7 +126,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); @@ -152,7 +150,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-2.1.2/obex/btobex.c newaffix/affix-2.1.2/obex/btobex.c --- oldaffix/affix-2.1.2/obex/btobex.c 2003-04-15 17:54:49.000000000 +0300 +++ newaffix/affix-2.1.2/obex/btobex.c 2005-07-01 14:38:10.000000000 +0300 @@ -152,16 +152,17 @@ fd = open(name, O_CREAT, 0600); close(fd); } else { -#if 0 - /* normal file - but may be object */ - rename(file, name); -#else - char cmd[PATH_MAX]; - sprintf(cmd, "mv \"%s\" \"%s\"", file, name); - fd = system(cmd); - if (fd) - BTERROR("failed: system(\"%s\") = %d\n", cmd, fd); -#endif + int status=0; + pid_t pid; + + switch (pid = fork()) { + case -1: + BTERROR("Fork error!\n"); + case 0: + execl("/bin/mv","/bin/mv",file,name,NULL); + default: + waitpid(pid,&status,0); + } } return 0; }