Fix an off-by-one bug.
authorAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 17:22:20 +0000 (18:22 +0100)
committerAndre Noll <maan@systemlinux.org>
Thu, 1 Nov 2007 17:22:20 +0000 (18:22 +0100)
aft.c

diff --git a/aft.c b/aft.c
index 133fe67..df8774a 100644 (file)
--- a/aft.c
+++ b/aft.c
@@ -727,7 +727,7 @@ int open_and_update_audio_file(struct osl_row *aft_row, struct audio_file_data *
                if (ret < 0)
                        goto err;
                strncpy(afd->afs_status_info, pb.buf, AFS_STATUS_INFO_SIZE);
-               afd->afs_status_info[AFS_STATUS_INFO_SIZE] = '\0';
+               afd->afs_status_info[AFS_STATUS_INFO_SIZE - 1] = '\0';
                free(pb.buf);
        }
        aced.aft_row = aft_row;