One-liner to quiet Coverity
authoraland <aland>
Sat, 7 Apr 2007 22:34:55 +0000 (22:34 +0000)
committeraland <aland>
Sat, 7 Apr 2007 22:34:55 +0000 (22:34 +0000)
This fixes Coverity bug #11

src/modules/rlm_otp/otp_pw_valid.c

index ba6709e..df8f7c1 100644 (file)
@@ -97,6 +97,7 @@ otp_pw_valid(REQUEST *request, int pwe, const char *challenge,
   /* otp_pwe_present() (done by caller) guarantees that both of these exist */
   cvp = pairfind(request->packet->vps, pwattr[pwe - 1]);
   rvp = pairfind(request->packet->vps, pwattr[pwe]);
+  if (!rvp || !cvp) return RLM_MODULE_REJECT;
 
   /*
    * Validate available vps based on pwe type.