aboutsummaryrefslogtreecommitdiffstats
path: root/src/configuration.h
diff options
context:
space:
mode:
authorJason Woodward2003-10-19 02:33:47 +0000
committerJason Woodward2003-10-19 02:33:47 +0000
commit05f4be1ce88f2a9423c9580754cfa6ee6ed387a6 (patch)
treee644db57576e0456f3999973890f541b839084b9 /src/configuration.h
parent38610930bdd533c827b8061a11aec93a87099c90 (diff)
downloadslapt-get-05f4be1ce88f2a9423c9580754cfa6ee6ed387a6.tar.gz
added more buffer checks in config parser
Diffstat (limited to 'src/configuration.h')
-rw-r--r--src/configuration.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/configuration.h b/src/configuration.h
index 244c7be..aa6be29 100644
--- a/src/configuration.h
+++ b/src/configuration.h
@@ -19,19 +19,20 @@
#define SOURCE_TOKEN "SOURCE="
#define WORKINGDIR_TOKEN "WORKINGDIR="
#define EXCLUDE_TOKEN "EXCLUDE="
+#define MAX_SOURCES 20
+#define MAX_SOURCE_URL_LEN 400
struct exclude_list {
- char excludes[100][50];
+ char **excludes;
int count;
};
struct source_list {
- char url[10][200];
+ char url[MAX_SOURCES][MAX_SOURCE_URL_LEN];
int count;
};
struct _configuration {
- char mirror_url[256];
struct source_list sources;
char working_dir[256];
int download_only;
@@ -47,6 +48,7 @@ struct _configuration {
typedef struct _configuration rc_config;
rc_config *read_rc_config(const char *);
+void free_rc_config(rc_config *);
void working_dir_init(const rc_config *);
FILE *open_file(const char *,const char *);
char spinner(void);