From: Andre Noll Date: Thu, 1 Nov 2007 17:22:20 +0000 (+0100) Subject: Fix an off-by-one bug. X-Git-Tag: v0.3.0~150 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=d0f8004acf8e8f78323d672813b4ead62d0c92ff;p=paraslash.git Fix an off-by-one bug. --- diff --git a/aft.c b/aft.c index 133fe672..df8774aa 100644 --- 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;