summaryrefslogtreecommitdiff
path: root/src/apk_state.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-04-15 12:44:24 +0300
committerTimo Teras <timo.teras@iki.fi>2009-04-15 12:44:24 +0300
commitebe43a5e01c7a581e12db6494419098d1556f5be (patch)
tree9f7f88359a05ce32f9af3200cc0d6ac56151599f /src/apk_state.h
parent33c2bc0d1ae695c64d94b0a96e39912000cd9f70 (diff)
downloadapk-tools-ebe43a5e01c7a581e12db6494419098d1556f5be.tar.gz
apk-tools-ebe43a5e01c7a581e12db6494419098d1556f5be.tar.bz2
apk-tools-ebe43a5e01c7a581e12db6494419098d1556f5be.tar.xz
apk-tools-ebe43a5e01c7a581e12db6494419098d1556f5be.zip
state: do not derefence unallocated memory
Enforce name_id to be within apk_state allocated area. New apk_name:s can be created later for e.g. unknown packages requested at command line.
Diffstat (limited to 'src/apk_state.h')
-rw-r--r--src/apk_state.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/apk_state.h b/src/apk_state.h
index 402b919..88a5ad0 100644
--- a/src/apk_state.h
+++ b/src/apk_state.h
@@ -23,7 +23,7 @@ struct apk_change {
};
struct apk_state {
- int refs;
+ unsigned int refs, num_names;
struct list_head change_list_head;
apk_name_state_t name[];
};