summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-02-10 03:50:50 +0000
committerJason Woodward2005-02-10 03:50:50 +0000
commitc04f29c1b93248b78b8753cd1d7cd5b31c0c8f6a (patch)
treed3c6e25c2cc33bcf6f619a6f2868b586876fe96b /src
parent8f4805802db4ffae5682b50db5f643cb51566e42 (diff)
downloadslapt-get-c04f29c1b93248b78b8753cd1d7cd5b31c0c8f6a.tar.gz
removed hardcoded limits REQUIRED_LEN CONFLICTS_LEN SUGGESTS_LEN
Diffstat (limited to 'src')
-rw-r--r--src/package.c16
-rw-r--r--src/package.h3
2 files changed, 0 insertions, 19 deletions
diff --git a/src/package.c b/src/package.c
index 2e5ba98..fe62dd5 100644
--- a/src/package.c
+++ b/src/package.c
@@ -259,12 +259,6 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
char *req_str = char_pointer + req_len;
getline_buffer[bytes_read - 1] = '\0';
- if( strlen(req_str) > REQUIRED_LEN ){
- fprintf( stderr, _("required too long\n"));
- free_pkg(tmp_pkg);
- continue;
- }
-
tmp_realloc = realloc(
tmp_pkg->required,
sizeof *tmp_pkg->required * (strlen(char_pointer + req_len) + 1)
@@ -287,11 +281,6 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
){
char *tmp_realloc = NULL;
char *conflicts = (char *)strpbrk(char_pointer,":") + 3;
- if( strlen(conflicts) > CONFLICTS_LEN ){
- fprintf( stderr, _("conflict too long\n"));
- free_pkg(tmp_pkg);
- continue;
- }
getline_buffer[bytes_read - 1] = '\0';
tmp_realloc = realloc(tmp_pkg->conflicts, sizeof *tmp_pkg->conflicts * (strlen(conflicts) + 1));
if( tmp_realloc != NULL ){
@@ -312,11 +301,6 @@ struct pkg_list *parse_packages_txt(FILE *pkg_list_fh){
){
char *tmp_realloc = NULL;
char *suggests = (char *)strpbrk(char_pointer,":") + 3;
- if( strlen(suggests) > SUGGESTS_LEN ){
- fprintf( stderr, _("suggests too long\n"));
- free_pkg(tmp_pkg);
- continue;
- }
getline_buffer[bytes_read - 1] = '\0';
tmp_realloc = realloc(tmp_pkg->suggests, sizeof *tmp_pkg->suggests * (strlen(suggests) + 1));
if( tmp_realloc != NULL ){
diff --git a/src/package.h b/src/package.h
index 0f30e16..8a8fc90 100644
--- a/src/package.h
+++ b/src/package.h
@@ -37,9 +37,6 @@
#define MIRROR_LEN 200
#define LOCATION_LEN 50
#define DESCRIPTION_LEN 1024
-#define REQUIRED_LEN 3072
-#define CONFLICTS_LEN 2048
-#define SUGGESTS_LEN 2048
#define MD5_STR_LEN 34
#define MD5_CHECKSUM_FAILED -100
#define PKG_LIST "PACKAGES.TXT"