aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2003-10-09 03:51:48 +0000
committerJason Woodward2003-10-09 03:51:48 +0000
commitf6e4e038424427dcd38ec499065c2358453c1768 (patch)
tree940f8615a942b3708d79ca5487a88d1dd4f6b90e
parentde3681376645235d77ed9bdbe0a64c3d7b4a0b48 (diff)
downloadslapt-get-f6e4e038424427dcd38ec499065c2358453c1768.tar.gz
additional error checking
-rw-r--r--src/package.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c
index e097bc9..88379a4 100644
--- a/src/package.c
+++ b/src/package.c
@@ -647,6 +647,10 @@ void get_md5sum(const rc_config *global_config,pkg_info_t *pkg,char *md5_sum){
checksum_file = open_file(CHECKSUM_FILE,"r");
md5sum_regex.reg_return = regcomp(&md5sum_regex.regex,MD5SUM_REGEX, REG_EXTENDED|REG_NEWLINE);
+ if( md5sum_regex.reg_return != 0 ){
+ fprintf(stderr,"Failed to compile regex [%s]\n",MD5SUM_REGEX);
+ exit(1);
+ }
while( (getline_read = getline(&getline_buffer,&getline_len,checksum_file) ) != EOF ){