X-Git-Url: https://git.draconx.ca/gitweb/upkg.git/blobdiff_plain/dc739f280f430ad323594ab38adf1e85b5ac0efd..79c3e2f505f985dba6755b2a1d6b8ca8299bdc6b:/src/libupkg.c diff --git a/src/libupkg.c b/src/libupkg.c index 004cb46..2c0cf07 100644 --- a/src/libupkg.c +++ b/src/libupkg.c @@ -357,12 +357,12 @@ static int pkg_init_imports(struct upkg *pkg) len = 0; rc = upkg_decode_index(&tmp, buf+len, nbuf-len); - if (rc == 0 || len < 0 || len >= pkg->name_count) goto err; + if (rc == 0 || len >= pkg->name_count) goto err; import->class_package = pkg->priv->names[tmp].name; len += rc; rc = upkg_decode_index(&tmp, buf+len, nbuf-len); - if (rc == 0 || len < 0 || len >= pkg->name_count) goto err; + if (rc == 0 || len >= pkg->name_count) goto err; import->class_name = pkg->priv->names[tmp].name; len += rc; @@ -371,7 +371,7 @@ static int pkg_init_imports(struct upkg *pkg) len += 4; rc = upkg_decode_index(&tmp, buf+len, nbuf-len); - if (rc == 0 || len < 0 || len >= pkg->name_count) goto err; + if (rc == 0 || len >= pkg->name_count) goto err; import->object_name = pkg->priv->names[tmp].name; len += rc;