aboutsummaryrefslogtreecommitdiffstats
path: root/src/package.c
diff options
context:
space:
mode:
authorJason Woodward2008-09-21 16:44:33 +0000
committerJason Woodward2008-09-21 16:44:33 +0000
commit5f2b44d8cf9b72a91c2debae81c6619e5b8bf35d (patch)
treee673d1cc1c0ce6cbeedc1088ce1a9cc5abc14ec4 /src/package.c
parentc9a122e6f76d74d3f22bfc745a36976217f5df6d (diff)
downloadslapt-get-5f2b44d8cf9b72a91c2debae81c6619e5b8bf35d.tar.gz
Fix for MD5 string length (Thanks to Boris Popov)
Diffstat (limited to 'src/package.c')
-rw-r--r--src/package.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/package.c b/src/package.c
index 4505f7b..83880e0 100644
--- a/src/package.c
+++ b/src/package.c
@@ -342,7 +342,7 @@ struct slapt_pkg_list *slapt_parse_packages_txt(FILE *pkg_list_fh)
}
strncpy(tmp_pkg->md5,md5sum,SLAPT_MD5_STR_LEN);
- tmp_pkg->md5[SLAPT_MD5_STR_LEN] = '\0';
+ tmp_pkg->md5[SLAPT_MD5_STR_LEN - 1] = '\0';
} else {
/* md5 sum isn't provided... rewind one line */
fseek(pkg_list_fh, (ftell(pkg_list_fh) - f_pos) * -1, SEEK_CUR);