fix order of operations merge regression
authorLuke Howard <lukeh@padl.com>
Wed, 11 Jan 2012 05:56:39 +0000 (16:56 +1100)
committerLuke Howard <lukeh@padl.com>
Wed, 11 Jan 2012 05:56:39 +0000 (16:56 +1100)
mech_eap/util_radius.cpp

index c76fffe..e152cd2 100644 (file)
@@ -282,7 +282,7 @@ getAttributeId(const gss_buffer_t desc,
     canon = isdigit(*(char *)desc->value);
 
     /* need to duplicate because attr may not be NUL terminated */
-    strAttr = (char *)GSSEAP_MALLOC(canon ? 5 : 0 + desc->length + 1);
+    strAttr = (char *)GSSEAP_MALLOC((canon ? 5 : 0) + desc->length + 1);
     if (strAttr == NULL)
         throw new std::bad_alloc();