--- orig/apps/app_agi.c 2003-07-14 12:17:16.000000000 -0400 +++ apps/app_agi.c 2003-08-04 10:47:24.000000000 -0400 @@ -452,13 +452,15 @@ int res = 0; int ms; - struct ast_dsp *sildet; /* silence detector dsp */ + /* XXXXXX someone should check sildet as it might be later hit with free() -- jim@reptiles.org */ + struct ast_dsp *sildet = NULL; /* silence detector dsp */ int totalsilence = 0; int dspsilence = 0; int silence = 0; /* amount of silence to allow */ int gotsilence = 0; /* did we timeout for silence? */ - char *silencestr; - int rfmt; + char *silencestr = NULL; + /* XXXXXX someone should check rfmt as it might be later used in a function -- jim@reptiles.org */ + int rfmt = 0; /* XXX EAGI FIXME XXX */ --- orig/apps/app_festival.c 2003-06-27 19:02:52.000000000 -0400 +++ apps/app_festival.c 2003-08-04 10:49:56.000000000 -0400 @@ -282,9 +282,9 @@ int readcache=0; int writecache=0; int strln; - int fdesc; + int fdesc = -1; char buffer[16384]; - int seekpos; + int seekpos = -1; struct ast_config *cfg; cfg = ast_load(FESTIVAL_CONFIG); --- orig/apps/app_macro.c 2003-04-23 19:54:48.000000000 -0400 +++ apps/app_macro.c 2003-08-04 10:52:49.000000000 -0400 @@ -59,7 +59,7 @@ char varname[80]; char *oldargs[MAX_ARGS + 1] = { NULL, }; int argc, x; - int res; + int res = 0; char oldexten[256]=""; int oldpriority; char pc[80]; --- orig/apps/app_record.c 2003-06-28 23:24:39.000000000 -0400 +++ apps/app_record.c 2003-08-04 10:44:36.000000000 -0400 @@ -56,14 +56,16 @@ struct localuser *u; struct ast_frame *f = NULL; - struct ast_dsp *sildet; /* silence detector dsp */ + /* XXXXXX someone should check sildet as it might be later hit with free() -- jim@reptiles.org */ + struct ast_dsp *sildet = NULL; /* silence detector dsp */ int totalsilence = 0; int dspsilence = 0; int silence = 0; /* amount of silence to allow */ int gotsilence = 0; /* did we timeout for silence? */ char silencestr[5]; int k = 0; - int rfmt; + /* XXXXXX someone should check rfmt as it might be later used in a function -- jim@reptiles.org */ + int rfmt = 0; vdata = data; /* explained above */ --- orig/apps/app_voicemail.c 2003-05-03 16:46:19.000000000 -0400 +++ apps/app_voicemail.c 2003-08-04 10:40:46.000000000 -0400 @@ -1466,8 +1466,17 @@ long duration; struct ast_config *mif; char miffile[256]; - char *copy, *name, *passwd, *email, *pager; - char *mycopy, *myname, *mypasswd, *myemail, *mypager; + char *copy; + /* XXXXX someone should check the logic below, as name/passwd/email may not be set as expected -- jim@reptiles.org */ + char *name = NULL; /* XXXXX */ + char *passwd = NULL; + char *email = NULL; /* XXXXX */ + char *pager = NULL; /* XXXXX */ + char *mycopy = NULL; + char *myname = NULL; /* XXXXX */ + char *mypasswd = NULL; + char *myemail = NULL; + char *mypager = NULL; char *astemail; char fn[256]; char callerid[512]; --- orig/codecs/lpc10/pitsyn.c 2003-02-12 08:59:15.000000000 -0500 +++ codecs/lpc10/pitsyn.c 2003-08-04 12:07:34.000000000 -0400 @@ -122,7 +122,9 @@ logical *first; /* System generated locals */ - integer rci_dim1, rci_offset, i__1, i__2; + /* XXXXXXXX check rci_dim1 for uninitialized value */ + integer rci_dim1 = 0; + integer rci_offset, i__1, i__2; real r__1; /* Builtin functions */ --- orig/codecs/lpc10/voicin.c 2003-02-12 08:59:15.000000000 -0500 +++ codecs/lpc10/voicin.c 2003-08-04 12:11:19.000000000 -0400 @@ -259,7 +259,10 @@ ; /* System generated locals */ - integer inbuf_offset, lpbuf_offset, i__1, i__2; + /* XXXXXXXXX check inbuf_offset and lpbuf_offset for uninitialized */ + integer inbuf_offset = 0; + integer lpbuf_offset = 0; + integer i__1, i__2; real r__1, r__2; /* Builtin functions */ --- orig/db1-ast/btree/bt_delete.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/btree/bt_delete.c 2003-08-04 15:45:02.000000000 -0400 @@ -146,15 +146,16 @@ PAGE **hp; CURSOR *c; { + indx_t index; BINTERNAL *bi; EPG *e; EPGNO *parent; PAGE *h; - indx_t index; pgno_t pgno; recno_t nextpg, prevpg; int exact, level; + index = 0; /* * Find the first occurrence of the key in the tree. Toss the * currently locked page so we don't hit an already-locked page. --- orig/db1-ast/btree/bt_put.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/btree/bt_put.c 2003-08-04 15:47:37.000000000 -0400 @@ -72,7 +72,7 @@ { BTREE *t; DBT tkey, tdata; - EPG *e; + EPG *e = NULL; PAGE *h; indx_t index, nxtindex; pgno_t pg; --- orig/db1-ast/btree/bt_seq.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/btree/bt_seq.c 2003-08-04 15:54:32.000000000 -0400 @@ -244,7 +244,7 @@ { CURSOR *c; PAGE *h; - indx_t index; + indx_t index = 0; pgno_t pg; int exact; --- orig/db1-ast/btree/bt_split.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/btree/bt_split.c 2003-08-04 15:50:09.000000000 -0400 @@ -87,14 +87,16 @@ size_t ilen; u_int32_t argskip; { - BINTERNAL *bi; - BLEAF *bl, *tbl; + BINTERNAL *bi = NULL; + BLEAF *bl = NULL; + BLEAF *tbl; DBT a, b; EPGNO *parent; PAGE *h, *l, *r, *lchild, *rchild; indx_t nxtindex; u_int16_t skip; - u_int32_t n, nbytes, nksize; + u_int32_t n, nbytes; + u_int32_t nksize = 0; int parentsplit; char *dest; @@ -622,7 +624,7 @@ CURSOR *c; RLEAF *rl; PAGE *rval; - void *src; + void *src = NULL; indx_t full, half, nxt, off, skip, top, used; u_int32_t nbytes; int bigkeycnt, isbigkey; --- orig/db1-ast/hash/hash_buf.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/hash/hash_buf.c 2003-08-04 15:36:40.000000000 -0400 @@ -114,6 +114,8 @@ SEGMENT segp; is_disk = 0; + segment_ndx = 0; + segp = NULL; is_disk_mask = 0; if (prev_bp) { bp = prev_bp->ovfl; --- orig/db1-ast/hash/hash_page.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/hash/hash_page.c 2003-08-04 15:39:50.000000000 -0400 @@ -665,7 +665,7 @@ overflow_page(hashp) HTAB *hashp; { - register u_int32_t *freep; + register u_int32_t *freep = NULL; register int max_free, offset, splitnum; u_int16_t addr; int bit, first_page, free_bit, free_page, i, in_use_bits, j; --- orig/db1-ast/recno/rec_open.c 2003-02-12 08:59:15.000000000 -0500 +++ db1-ast/recno/rec_open.c 2003-08-04 15:51:13.000000000 -0400 @@ -63,7 +63,8 @@ DB *dbp; PAGE *h; struct stat sb; - int rfd, sverrno; + int rfd = -1; + int sverrno; /* Open the user's file -- if this fails, we're done. */ if (fname != NULL && (rfd = open(fname, flags, mode)) < 0) --- orig/formats/format_g729.c 2003-06-28 18:50:47.000000000 -0400 +++ formats/format_g729.c 2003-08-04 12:16:53.000000000 -0400 @@ -168,7 +168,9 @@ static int g729_seek(struct ast_filestream *fs, long sample_offset, int whence) { long bytes; - off_t min,cur,max,offset; + off_t min,cur,max; + /* XXXXXX check offset for uninitialized */ + off_t offset = 0; min = 0; cur = lseek(fs->fd, 0, SEEK_CUR); max = lseek(fs->fd, 0, SEEK_END); --- orig/formats/format_pcm.c 2003-06-28 18:50:47.000000000 -0400 +++ formats/format_pcm.c 2003-08-04 12:14:30.000000000 -0400 @@ -158,7 +158,9 @@ static int pcm_seek(struct ast_filestream *fs, long sample_offset, int whence) { - off_t offset,min,cur,max; + /* XXXXX check offset for uninitialized */ + off_t offset = 0; + off_t min,cur,max; min = 0; cur = lseek(fs->fd, 0, SEEK_CUR); --- orig/formats/format_pcm_alaw.c 2003-06-28 18:50:47.000000000 -0400 +++ formats/format_pcm_alaw.c 2003-08-04 12:17:40.000000000 -0400 @@ -237,7 +237,9 @@ static int pcm_seek(struct ast_filestream *fs, long sample_offset, int whence) { - off_t offset,min,cur,max; + /* XXXXX check offset for uninitialized */ + off_t offset = 0; + off_t min,cur,max; min = 0; cur = lseek(fs->fd, 0, SEEK_CUR);