From a1a43053f6dca19ecf37c602563fc90bd64e5644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 30 Jun 2003 10:34:05 +0000 Subject: [PATCH] (find_dynamic_method): if there isn't a prefix, don't load anything git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@12415 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hdb/hdb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/hdb/hdb.c b/lib/hdb/hdb.c index d7a470ec2..fc7d583c6 100644 --- a/lib/hdb/hdb.c +++ b/lib/hdb/hdb.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan + * Copyright (c) 1997 - 2001, 2003 Kungliga Tekniska Högskolan * (Royal Institute of Technology, Stockholm, Sweden). * All rights reserved. * @@ -231,13 +231,13 @@ find_dynamic_method (krb5_context context, dl = NULL; p = strchr(filename, ':'); - if (p != NULL) { - len = p - filename; - *rest = filename + len + 1; - } else { - len = strlen(filename); - *rest = ""; - } + + /* if no prefix, don't know what module to load, just ignore it */ + if (p == NULL) + return NULL; + + len = p - filename; + *rest = filename + len + 1; prefix = strndup(filename, len); if (prefix == NULL)