diff options
author | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-01 21:34:29 (EST) |
---|---|---|
committer | graham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358> | 2009-11-01 21:34:29 (EST) |
commit | 90e7aaf73bf13ddffddb746ce3627f26d53ed703 (patch) | |
tree | 8876411b603dffc1b38b66341ba5cdd108694ef6 | |
parent | 25abd20abaaa030fbdc1d1d909874790e36f82b8 (diff) |
Avoid reading past the end of the array.
git-svn-id: http://opkg.googlecode.com/svn/trunk@236 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358
-rw-r--r-- | libopkg/opkg_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/opkg_cmd.c b/libopkg/opkg_cmd.c index b2ba7a5..e7038c5 100644 --- a/libopkg/opkg_cmd.c +++ b/libopkg/opkg_cmd.c @@ -455,7 +455,7 @@ static int opkg_recurse_pkgs_in_order(opkg_conf_t *conf, pkg_t *pkg, pkg_vec_t * dependents = abpkg->provided_by->pkgs; l = 0; if (dependents != NULL) - while (dependents [l] != NULL && l < abpkg->provided_by->len) { + while (l < abpkg->provided_by->len && dependents[l] != NULL) { opkg_message(conf, OPKG_INFO, " Descending on pkg: %s\n", dependents [l]->name); |