aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/jpilot.c2
2 files changed, 7 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index fd1f9f42..66d5ecfa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-11-27
+ * src/jpilot.c: jpilot_read_db_files(): fixed uninitialized variable
+ "attrib", "unique_id" and "next_offset".
+
+2013-11-27
+
* src/template.c: template_load(): fixed fp leak on error.
* plugin/attachment_tool/attachment_tool.c: remove_attachment():
fixed fp leak on error.
diff --git a/src/jpilot.c b/src/jpilot.c
index ca8e391b..c6e3f3ee 100644
--- a/src/jpilot.c
+++ b/src/jpilot.c
@@ -899,9 +899,11 @@ static gint jpilot_read_db_files( JPilotFile *pilotFile, GList **records ) {
temp_mem_rh = mem_rh;
if (num_records) {
+ attrib = unique_id = 0;
if (out_of_order) {
find_next_offset(mem_rh, 0, &next_offset, &attrib, &unique_id);
} else {
+ next_offset = 0xFFFFFF;
if (mem_rh) {
next_offset = mem_rh->offset;
attrib = mem_rh->attrib;