add an extra assert
[mech_eap.orig] / util_adshim.c
index c0b6837..30b525f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, JANET(UK)
+ * Copyright (c) 2011, JANET(UK)
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -171,6 +171,9 @@ radius_ad_get_attribute(krb5_context kcontext,
                radius_ad_attr.length) != 0)
         return ENOENT;
 
+    if (radius_ad->avpdata.length == 0)
+        return ENOENT;
+
     *authenticated = radius_ad->verified;
     *complete = TRUE;
     *more = 0;