fixed length check
authorAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 12 Jun 2011 19:49:53 +0000 (21:49 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Sun, 12 Jun 2011 19:49:53 +0000 (21:49 +0200)
src/libcharon/tnc/tnccs/tnccs_manager.c

index 6f120ea..db72011 100644 (file)
@@ -409,7 +409,7 @@ METHOD(tnccs_manager_t, get_attribute, TNC_Result,
                        return TNC_RESULT_INVALID_PARAMETER;
                }
                *out_value_len = pref_lang.len;
-               if (buffer && buffer_len <= pref_lang.len)
+               if (buffer && buffer_len >= pref_lang.len)
                {
                        memcpy(buffer, pref_lang.ptr, pref_lang.len);
                }