From cc44d065bbbf5b5430ea71f0076820ec99eb4894 Mon Sep 17 00:00:00 2001 From: David Hampton Date: Mon, 20 Feb 2006 21:06:32 +0000 Subject: [PATCH] Don't reference uninitialized memory. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@13331 57a11ea4-9604-0410-9ed3-97b8803252fd --- ChangeLog | 5 ++++- lib/libqof/qof/guid.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 98a8b5e139..e9909ebdf3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-02-20 David Hampton + + * lib/libqof/qof/guid.c: Don't reference uninitialized memory. + 2006-02-20 Neil Williams * lib/libqof/qof/gnc-event.c : @@ -17,7 +21,6 @@ * lib/libqof/qof/qof.h : Replace files. * lib/libqof/qof/Makefile.am : Replace files. - 2006-02-20 David Hampton * src/gnome/dialog-scheduledxaction.c: diff --git a/lib/libqof/qof/guid.c b/lib/libqof/qof/guid.c index 87c268be47..7d4c6f9350 100644 --- a/lib/libqof/qof/guid.c +++ b/lib/libqof/qof/guid.c @@ -257,7 +257,7 @@ init_from_dir(const char *dirname, unsigned int max_files) if (de == NULL) break; - md5_process_bytes(de, sizeof(struct dirent), &guid_context); + md5_process_bytes(de, strlen(de->d_name), &guid_context); total += sizeof(struct dirent); result = snprintf(filename, sizeof(filename),