aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2004-11-19 06:12:41 +0000
committerJason Woodward2004-11-19 06:12:41 +0000
commit8d628e088d7f6659b1bcb4027ae42162f3aaad1d (patch)
tree06b1d4d8f529857b19e3a583a6163ae048878715
parentfa060b2e92a1a4d98783322302a9d35a5ca4d4cb (diff)
downloadslapt-get-8d628e088d7f6659b1bcb4027ae42162f3aaad1d.tar.gz
fixed bug in conflicts and suggestions, strings where not null terminated
-rw-r--r--src/package.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/package.c b/src/package.c
index 77dc5ec..029e5b7 100644
--- a/src/package.c
+++ b/src/package.c
@@ -295,7 +295,7 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
continue;
}
getline_buffer[bytes_read - 1] = '\0';
- strncpy(tmp_pkg->conflicts,conflicts,strlen(conflicts));
+ strncat(tmp_pkg->conflicts,conflicts,strlen(conflicts));
}else{
/* conflicts isn't provided... rewind one line */
fseek(pkg_list_fh, (ftell(pkg_list_fh) - f_pos) * -1, SEEK_CUR);
@@ -318,7 +318,7 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
continue;
}
getline_buffer[bytes_read - 1] = '\0';
- strncpy(tmp_pkg->suggests,suggests,strlen(suggests));
+ strncat(tmp_pkg->suggests,suggests,strlen(suggests));
}else{
/* suggests isn't provided... rewind one line */
fseek(pkg_list_fh, (ftell(pkg_list_fh) - f_pos) * -1, SEEK_CUR);