diff -urN libpst-0.5.1.orig/libpst.c libpst-0.5.1/libpst.c --- libpst-0.5.1.orig/libpst.c 2004-12-15 23:23:52.000000000 -0500 +++ libpst-0.5.1/libpst.c 2004-12-16 00:06:24.630215120 -0500 @@ -261,7 +261,7 @@ int32_t pst_attach_to_file(pst_file *pf, pst_item_attach *attach, FILE* fp) { pst_index_ll *ptr; struct holder h = {NULL, fp, 0, "", 0}; - int32_t size; + int32_t size = 0; DEBUG_ENT("pst_attach_to_file"); if (attach->id_val != -1) { ptr = _pst_getID(pf, attach->id_val); @@ -283,7 +283,7 @@ int32_t pst_attach_to_file_base64(pst_file *pf, pst_item_attach *attach, FILE* fp) { pst_index_ll *ptr; struct holder h = {NULL, fp, 1, "", 0}; - int32_t size; + int32_t size = 0; char *c; DEBUG_ENT("pst_attach_to_file_base64"); if (attach->id_val != -1) { @@ -373,10 +373,10 @@ pst_desc_ll *p; pst_num_array *na; // pst_index_ll *list; - pst_index2_ll *list2;//, *t; + pst_index2_ll *list2 = NULL;//, *t; unsigned char * buffer=NULL, *headerbuffer=NULL;//, *tc; pst_x_attrib xattrib; - int32_t bptr = 0, bsize, hsize, tint, err=0, x; + int32_t bptr = 0, bsize=0, hsize=0, tint, err=0, x; pst_x_attrib_ll *ptr, *p_head=NULL, *p_sh=NULL, *p_sh2=NULL; char *wt; diff -urN libpst-0.5.1.orig/lspst.c libpst-0.5.1/lspst.c --- libpst-0.5.1.orig/lspst.c 2004-12-15 23:23:52.000000000 -0500 +++ libpst-0.5.1/lspst.c 2004-12-16 00:08:07.554568240 -0500 @@ -37,7 +37,10 @@ char *rfc2426_escape(char *str); char *rfc2445_datetime_format(FILETIME *ft); // }}}1 -#define DEBUG_MAIN(x) debug_print x; +#ifdef DEBUG_MAIN +# undef DEBUG_MAIN +# define DEBUG_MAIN(x) debug_print x; +#endif /* DEBUG_MAIN */ // int main(int argc, char** argv) {{{1 int main(int argc, char** argv) { @@ -47,7 +50,7 @@ pst_desc_ll *d_ptr; char *temp = NULL; //temporary char pointer int skip_child = 0; - struct file_ll *f, *head; + struct file_ll *f = NULL, *head = NULL; // }}}2 if (argc <= 1) diff -urN libpst-0.5.1.orig/Makefile libpst-0.5.1/Makefile --- libpst-0.5.1.orig/Makefile 2004-12-15 23:23:52.000000000 -0500 +++ libpst-0.5.1/Makefile 2004-12-16 00:12:08.190985944 -0500 @@ -1,7 +1,8 @@ #!/usr/bin/make -f -CFLAGS ?= -g -Wall -PREFIX ?= /usr/local +CC ?= gcc +CFLAGS += -Wall +PREFIX ?= /usr INSTALL ?= install #---------------- Do not modify below this point ------------------ @@ -58,8 +59,6 @@ $(INSTALL_PROGRAM) readpst{,log} $(DESTDIR)$(PREFIX)/bin $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/man/man1 $(INSTALL_FILE) readpst{,log}.1 $(DESTDIR)$(PREFIX)/share/man/man1/ - $(INSTALL_DIR) $(DESTDIR)$(PREFIX)/share/doc/libpst - $(INSTALL_FILE) $(DOCS) $(DESTDIR)$(PREFIX)/share/doc/libpst/ uninstall: -rm -f $(DESTDIR)$(PREFIX)/bin/readpst{,log} diff -urN libpst-0.5.1.orig/readpst.c libpst-0.5.1/readpst.c --- libpst-0.5.1.orig/readpst.c 2004-12-15 23:23:52.000000000 -0500 +++ libpst-0.5.1/readpst.c 2004-12-15 23:59:05.334998144 -0500 @@ -144,7 +144,7 @@ int base64_body = 0; // int encrypt = 0; FILE *fp; - char *enc; // base64 encoded attachment + char *enc = NULL; // base64 encoded attachment char *boundary = NULL, *b1, *b2; // the boundary marker between multipart sections char *temp = NULL; //temporary char pointer int attach_num = 0; diff -urN libpst-0.5.1.orig/readpstlog.c libpst-0.5.1/readpstlog.c --- libpst-0.5.1.orig/readpstlog.c 2004-12-15 23:23:52.000000000 -0500 +++ libpst-0.5.1/readpstlog.c 2004-12-16 00:04:38.368369376 -0500 @@ -21,11 +21,11 @@ int main(int argc, char** argv) { int *i=NULL, x, ptr, stop=0, flag; - char *fname, *buf, format, rec_type; + char *fname, *buf, format=0, rec_type; unsigned char version; int *show_type=NULL, show_size=0; int *ex_type=NULL, ex_size=0; - unsigned int funcname, filename, text, end, dtype, line, c; + unsigned int funcname=0, filename=0, text=0, end=0, dtype=0, line=0, c=0; FILE *fp; struct _debug_file_rec_m mfile_rec; struct _debug_file_rec_l lfile_rec;