diff -urN app_voicemail.c.orig app_voicemail.c --- app_voicemail.c.orig 2006-06-23 10:00:49.000000000 -0400 +++ app_voicemail.c 2006-06-23 09:58:19.000000000 -0400 @@ -850,6 +850,7 @@ char fn[256]; char full_fn[256]; char msgnums[80]; + struct stat stat_buf; odbc_obj *obj; obj = fetch_odbc_obj(odbc_database, 0); @@ -928,6 +929,7 @@ if (fd > -1) { char tmp[1]=""; lseek(fd, fdlen - 1, SEEK_SET); + fstat(fd, &stat_buf); if (write(fd, tmp, 1) != 1) { close(fd); fd = -1;