summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2006-08-07 16:34:57 +0000
committerStef Walter <stef@memberwebs.com>2006-08-07 16:34:57 +0000
commitab73e5c71e4131dd25681cf8492b7d47f751edea (patch)
treef606bddf84c7388d9001b9670ebb16ef5a1e4140
parentaf9c5fc92f0a9c5b5becfdbcb9f6d3a4b80ad723 (diff)
Better messages when an OID is too short.
-rw-r--r--bsnmp/asn1.c2
-rw-r--r--common/config-parser.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/bsnmp/asn1.c b/bsnmp/asn1.c
index 8a206ee..be5e2a6 100644
--- a/bsnmp/asn1.c
+++ b/bsnmp/asn1.c
@@ -632,7 +632,7 @@ asn_put_objid(struct asn_buf *b, const struct asn_oid *oid)
oidlen = 2;
} else if (oid->len == 1) {
/* illegal */
- asn_error(b, "short oid");
+ asn_error(NULL, "short oid");
if (oid->subs[0] > 2)
asn_error(NULL, "oid[0] too large (%u)", oid->subs[0]);
err = ASN_ERR_RANGE;
diff --git a/common/config-parser.c b/common/config-parser.c
index c096104..63c1bbb 100644
--- a/common/config-parser.c
+++ b/common/config-parser.c
@@ -354,7 +354,7 @@ cfg_parse_uri (char *uri, char** scheme, char** host, char** user, char** path)
if(!*host[0])
return "invalid uri: no host name found";
- if(!uri || !uri[0] || !uri[1])
+ if(!uri || !uri[0])
return "invalid uri: no path found";
*path = uri;